| Index: chrome/browser/apps/drive/drive_app_provider.cc
|
| diff --git a/chrome/browser/apps/drive/drive_app_provider.cc b/chrome/browser/apps/drive/drive_app_provider.cc
|
| index 15be11005cf990451876c2beb24f9fb608b5f540..a8f2fee9012cc5821d01924784f722fa23466f45 100644
|
| --- a/chrome/browser/apps/drive/drive_app_provider.cc
|
| +++ b/chrome/browser/apps/drive/drive_app_provider.cc
|
| @@ -42,6 +42,7 @@ DriveAppProvider::DriveAppProvider(
|
| uninstall_sync_service_(uninstall_sync_service),
|
| service_bridge_(DriveServiceBridge::Create(profile).Pass()),
|
| mapping_(new DriveAppMapping(profile->GetPrefs())),
|
| + drive_app_registry_updated_(false),
|
| weak_ptr_factory_(this) {
|
| service_bridge_->GetAppRegistry()->AddObserver(this);
|
| ExtensionRegistry::Get(profile_)->AddObserver(this);
|
| @@ -236,6 +237,9 @@ void DriveAppProvider::ProcessRemovedDriveApp(const std::string& drive_app_id) {
|
| }
|
|
|
| void DriveAppProvider::UpdateDriveApps() {
|
| + if (!drive_app_registry_updated_)
|
| + return;
|
| +
|
| service_bridge_->GetAppRegistry()->GetAppList(&drive_apps_);
|
|
|
| IdSet current_ids;
|
| @@ -266,6 +270,7 @@ void DriveAppProvider::UpdateDriveApps() {
|
| }
|
|
|
| void DriveAppProvider::OnDriveAppRegistryUpdated() {
|
| + drive_app_registry_updated_ = true;
|
| UpdateDriveApps();
|
| }
|
|
|
|
|