| Index: chrome/browser/chromeos/drive/drive_file_system.cc
|
| diff --git a/chrome/browser/chromeos/drive/drive_file_system.cc b/chrome/browser/chromeos/drive/drive_file_system.cc
|
| index 908001e88b68d23ffaab95aff5556303a75d19a6..0c35c357f9a3b462290165c2f89debcdcec5c8b8 100644
|
| --- a/chrome/browser/chromeos/drive/drive_file_system.cc
|
| +++ b/chrome/browser/chromeos/drive/drive_file_system.cc
|
| @@ -42,6 +42,12 @@ using content::BrowserThread;
|
| namespace drive {
|
| namespace {
|
|
|
| +// The resource ID for the root directory for WAPI is defined in the spec:
|
| +// https://developers.google.com/google-apps/documents-list/
|
| +// Note that this special ID only applies to WAPI. Drive uses a non-constant
|
| +// unique ID given in About resource.
|
| +const char kWAPIRootDirectoryResourceId[] = "folder:root";
|
| +
|
| const char kMimeTypeJson[] = "application/json";
|
| const char kEmptyFilePath[] = "/dev/null";
|
|
|
| @@ -392,6 +398,10 @@ void DriveFileSystem::Initialize() {
|
| drive_service_->Initialize(profile_);
|
|
|
| resource_metadata_.reset(new DriveResourceMetadata);
|
| + if (!google_apis::util::IsDriveV2ApiEnabled())
|
| + resource_metadata_->InitializeRootEntry(kWAPIRootDirectoryResourceId);
|
| + // If Drive API is enabled, the root directory is initialized after
|
| + // About resource is obtained.
|
| feed_loader_.reset(new DriveFeedLoader(resource_metadata_.get(),
|
| drive_service_,
|
| webapps_registry_,
|
|
|