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

Unified Diff: chrome/browser/extensions/external_pref_loader.h

Issue 957753002: Install default apps if sync is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/external_pref_loader.h
diff --git a/chrome/browser/extensions/external_pref_loader.h b/chrome/browser/extensions/external_pref_loader.h
index dca6dad985035cc5f02eb498fbb619e2c9e1d7f1..d951db8709b6c763aafdd3021c9ba7f9bef35342 100644
--- a/chrome/browser/extensions/external_pref_loader.h
+++ b/chrome/browser/extensions/external_pref_loader.h
@@ -13,6 +13,8 @@
#include "base/values.h"
#include "chrome/browser/extensions/external_loader.h"
#include "chrome/browser/prefs/pref_service_syncable_observer.h"
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_observer.h"
class PrefServiceSyncable;
class Profile;
@@ -24,7 +26,8 @@ namespace extensions {
// Instances of this class are expected to be created and destroyed on the UI
// thread and they are expecting public method calls from the UI thread.
class ExternalPrefLoader : public ExternalLoader,
- public PrefServiceSyncableObserver {
+ public PrefServiceSyncableObserver,
+ public ProfileSyncServiceObserver {
public:
enum Options {
NONE = 0,
@@ -67,9 +70,15 @@ class ExternalPrefLoader : public ExternalLoader,
// PrefServiceSyncableObserver:
void OnIsSyncingChanged() override;
+ // ProfileSyncServiceObserver
+ void OnStateChanged() override;
+
// If priority sync ready posts LoadOnFileThread and return true.
bool PostLoadIfPrioritySyncReady();
+ // Post LoadOnFileThread and stop observing for sync service states.
+ void PostLoadAndRemoveObservers();
+
// Actually searches for and loads candidate standalone extension preference
// files in the path corresponding to |base_path_id|.
// Must be called on the file thread.
« no previous file with comments | « no previous file | chrome/browser/extensions/external_pref_loader.cc » ('j') | chrome/browser/extensions/external_pref_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698