Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/extensions/extension_sync_service.cc

Issue 195813007: Remove ExtensionService::IsExternalExtensionUninstalled() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_sync_service.h" 5 #include "chrome/browser/extensions/extension_sync_service.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 if (extension_sync_data.uninstalled()) { 380 if (extension_sync_data.uninstalled()) {
381 if (!extension_service_->UninstallExtensionHelper(extension_service_, id)) { 381 if (!extension_service_->UninstallExtensionHelper(extension_service_, id)) {
382 LOG(WARNING) << "Could not uninstall extension " << id 382 LOG(WARNING) << "Could not uninstall extension " << id
383 << " for sync"; 383 << " for sync";
384 } 384 }
385 return true; 385 return true;
386 } 386 }
387 387
388 // Extension from sync was uninstalled by the user as external extensions. 388 // Extension from sync was uninstalled by the user as external extensions.
389 // Honor user choice and skip installation/enabling. 389 // Honor user choice and skip installation/enabling.
390 if (extension_service_->IsExternalExtensionUninstalled(id)) { 390 if (extensions::ExtensionPrefs::Get(profile_)
391 ->IsExternalExtensionUninstalled(id)) {
391 LOG(WARNING) << "Extension with id " << id 392 LOG(WARNING) << "Extension with id " << id
392 << " from sync was uninstalled as external extension"; 393 << " from sync was uninstalled as external extension";
393 return true; 394 return true;
394 } 395 }
395 396
396 // Set user settings. 397 // Set user settings.
397 // If the extension has been disabled from sync, it may not have 398 // If the extension has been disabled from sync, it may not have
398 // been installed yet, so we don't know if the disable reason was a 399 // been installed yet, so we don't know if the disable reason was a
399 // permissions increase. That will be updated once CheckPermissionsIncrease 400 // permissions increase. That will be updated once CheckPermissionsIncrease
400 // is called for it. 401 // is called for it.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 app_sync_bundle_.SyncChangeIfNeeded(extension); 456 app_sync_bundle_.SyncChangeIfNeeded(extension);
456 else if (extension_service_->is_ready() && !flare_.is_null()) 457 else if (extension_service_->is_ready() && !flare_.is_null())
457 flare_.Run(syncer::APPS); 458 flare_.Run(syncer::APPS);
458 } else if (extensions::sync_helper::IsSyncableExtension(&extension)) { 459 } else if (extensions::sync_helper::IsSyncableExtension(&extension)) {
459 if (extension_sync_bundle_.IsSyncing()) 460 if (extension_sync_bundle_.IsSyncing())
460 extension_sync_bundle_.SyncChangeIfNeeded(extension); 461 extension_sync_bundle_.SyncChangeIfNeeded(extension);
461 else if (extension_service_->is_ready() && !flare_.is_null()) 462 else if (extension_service_->is_ready() && !flare_.is_null())
462 flare_.Run(syncer::EXTENSIONS); 463 flare_.Run(syncer::EXTENSIONS);
463 } 464 }
464 } 465 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698