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_THEMES_THEME_SYNCABLE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_THEMES_THEME_SYNCABLE_SERVICE_H_ |
6 #define CHROME_BROWSER_THEMES_THEME_SYNCABLE_SERVICE_H_ | 6 #define CHROME_BROWSER_THEMES_THEME_SYNCABLE_SERVICE_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
10 #include "sync/api/sync_change.h" | 10 #include "sync/api/sync_change.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 static syncer::ModelType model_type() { return syncer::THEMES; } | 30 static syncer::ModelType model_type() { return syncer::THEMES; } |
31 | 31 |
32 // Called by ThemeService when user changes theme. | 32 // Called by ThemeService when user changes theme. |
33 void OnThemeChange(); | 33 void OnThemeChange(); |
34 | 34 |
35 // syncer::SyncableService implementation. | 35 // syncer::SyncableService implementation. |
36 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 36 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
37 syncer::ModelType type, | 37 syncer::ModelType type, |
38 const syncer::SyncDataList& initial_sync_data, | 38 const syncer::SyncDataList& initial_sync_data, |
39 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 39 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
40 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; | 40 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; |
41 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 41 virtual void StopSyncing(syncer::ModelType type) override; |
42 virtual syncer::SyncDataList GetAllSyncData( | 42 virtual syncer::SyncDataList GetAllSyncData( |
43 syncer::ModelType type) const OVERRIDE; | 43 syncer::ModelType type) const override; |
44 virtual syncer::SyncError ProcessSyncChanges( | 44 virtual syncer::SyncError ProcessSyncChanges( |
45 const tracked_objects::Location& from_here, | 45 const tracked_objects::Location& from_here, |
46 const syncer::SyncChangeList& change_list) OVERRIDE; | 46 const syncer::SyncChangeList& change_list) override; |
47 | 47 |
48 // Client tag and tile of theme node in sync. | 48 // Client tag and tile of theme node in sync. |
49 static const char kCurrentThemeClientTag[]; | 49 static const char kCurrentThemeClientTag[]; |
50 static const char kCurrentThemeNodeTitle[]; | 50 static const char kCurrentThemeNodeTitle[]; |
51 | 51 |
52 private: | 52 private: |
53 static bool AreThemeSpecificsEqual( | 53 static bool AreThemeSpecificsEqual( |
54 const sync_pb::ThemeSpecifics& a, | 54 const sync_pb::ThemeSpecifics& a, |
55 const sync_pb::ThemeSpecifics& b, | 55 const sync_pb::ThemeSpecifics& b, |
56 bool is_system_theme_distinct_from_default_theme); | 56 bool is_system_theme_distinct_from_default_theme); |
(...skipping 28 matching lines...) Expand all Loading... |
85 bool use_system_theme_by_default_; | 85 bool use_system_theme_by_default_; |
86 | 86 |
87 base::ThreadChecker thread_checker_; | 87 base::ThreadChecker thread_checker_; |
88 | 88 |
89 FRIEND_TEST_ALL_PREFIXES(ThemeSyncableServiceTest, AreThemeSpecificsEqual); | 89 FRIEND_TEST_ALL_PREFIXES(ThemeSyncableServiceTest, AreThemeSpecificsEqual); |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(ThemeSyncableService); | 91 DISALLOW_COPY_AND_ASSIGN(ThemeSyncableService); |
92 }; | 92 }; |
93 | 93 |
94 #endif // CHROME_BROWSER_THEMES_THEME_SYNCABLE_SERVICE_H_ | 94 #endif // CHROME_BROWSER_THEMES_THEME_SYNCABLE_SERVICE_H_ |
OLD | NEW |