drive: Stop calling OnChangeListLoadComplete() if DirectoryFetchInfo is not empty

Call LoadAfterLoadDirectory() instead.

BUG=333164
TEST=unit_tests

Review URL: https://codereview.chromium.org/132503004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244406 0039d316-1c4b-4281-b951-d872f2087c98
FileError AddMyDriveIfNeeded(
    ResourceMetadata* resource_metadata,
    const google_apis::AboutResource& about_resource,
    base::FilePath* changed_directory_path) {
  ResourceEntry entry;
  FileError error = resource_metadata->GetResourceEntryByPath(
      util::GetDriveMyDriveRootPath(), &entry);
  if (error != FILE_ERROR_NOT_FOUND)
    return error;

  std::string local_id;
  error = resource_metadata->AddEntry(
      util::CreateMyDriveRootEntry(about_resource.root_folder_id()),
      &local_id);
  if (error != FILE_ERROR_OK)
    return error;

  *changed_directory_path = util::GetDriveGrandRootPath();
  return FILE_ERROR_OK;
}

FileError AddMyDriveIfNeeded(
    ResourceMetadata* resource_metadata,
    const google_apis::AboutResource& about_resource,
    base::FilePath* changed_directory_path) {
  ResourceEntry entry;
  FileError error = resource_metadata->GetResourceEntryByPath(
      util::GetDriveMyDriveRootPath(), &entry);
  if (error != FILE_ERROR_NOT_FOUND)
    return error;

  std::string local_id;
  error = resource_metadata->AddEntry(
      util::CreateMyDriveRootEntry(about_resource.root_folder_id()),
      &local_id);
  if (error != FILE_ERROR_OK)
    return error;

  *changed_directory_path = util::GetDriveGrandRootPath();
  return FILE_ERROR_OK;
}
