| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_LOADER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_LOADER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_LOADER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_LOADER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 const Options options_; | 69 const Options options_; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 friend class base::RefCountedThreadSafe<ExternalLoader>; | 72 friend class base::RefCountedThreadSafe<ExternalLoader>; |
| 73 | 73 |
| 74 // sync_preferences::PrefServiceSyncableObserver: | 74 // sync_preferences::PrefServiceSyncableObserver: |
| 75 void OnIsSyncingChanged() override; | 75 void OnIsSyncingChanged() override; |
| 76 | 76 |
| 77 // syncer::SyncServiceObserver | 77 // syncer::SyncServiceObserver |
| 78 void OnStateChanged() override; | 78 void OnStateChanged(syncer::SyncService* sync) override; |
| 79 | 79 |
| 80 // If priority sync ready posts LoadOnFileThread and return true. | 80 // If priority sync ready posts LoadOnFileThread and return true. |
| 81 bool PostLoadIfPrioritySyncReady(); | 81 bool PostLoadIfPrioritySyncReady(); |
| 82 | 82 |
| 83 // Post LoadOnFileThread and stop observing for sync service states. | 83 // Post LoadOnFileThread and stop observing for sync service states. |
| 84 void PostLoadAndRemoveObservers(); | 84 void PostLoadAndRemoveObservers(); |
| 85 | 85 |
| 86 // Actually searches for and loads candidate standalone extension preference | 86 // Actually searches for and loads candidate standalone extension preference |
| 87 // files in the path corresponding to |base_path_id|. | 87 // files in the path corresponding to |base_path_id|. |
| 88 // Must be called on the file thread. | 88 // Must be called on the file thread. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 base::FilePath fake_base_path_; | 137 base::FilePath fake_base_path_; |
| 138 std::unique_ptr<base::DictionaryValue> testing_prefs_; | 138 std::unique_ptr<base::DictionaryValue> testing_prefs_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(ExternalTestingLoader); | 140 DISALLOW_COPY_AND_ASSIGN(ExternalTestingLoader); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace extensions | 143 } // namespace extensions |
| 144 | 144 |
| 145 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_LOADER_H_ | 145 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_LOADER_H_ |
| OLD | NEW |