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_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 Profile* profile, base::Closure callback); | 90 Profile* profile, base::Closure callback); |
91 | 91 |
92 ProfileSyncComponentsFactoryMock* components_factory_mock(); | 92 ProfileSyncComponentsFactoryMock* components_factory_mock(); |
93 | 93 |
94 syncer::TestIdFactory* id_factory(); | 94 syncer::TestIdFactory* id_factory(); |
95 | 95 |
96 // Raise visibility to ease testing. | 96 // Raise visibility to ease testing. |
97 using ProfileSyncService::NotifyObservers; | 97 using ProfileSyncService::NotifyObservers; |
98 | 98 |
99 protected: | 99 protected: |
100 static KeyedService* TestFactoryFunction(content::BrowserContext* profile); | 100 static scoped_ptr<KeyedService> TestFactoryFunction( |
| 101 content::BrowserContext* profile); |
101 | 102 |
102 // Return NULL handle to use in backend initialization to avoid receiving | 103 // Return NULL handle to use in backend initialization to avoid receiving |
103 // js messages on UI loop when it's being destroyed, which are not deleted | 104 // js messages on UI loop when it's being destroyed, which are not deleted |
104 // and cause memory leak in test. | 105 // and cause memory leak in test. |
105 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; | 106 syncer::WeakHandle<syncer::JsEventHandler> GetJsEventHandler() override; |
106 | 107 |
107 bool NeedBackup() const override; | 108 bool NeedBackup() const override; |
108 | 109 |
109 private: | 110 private: |
110 syncer::TestIdFactory id_factory_; | 111 syncer::TestIdFactory id_factory_; |
111 }; | 112 }; |
112 | 113 |
113 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 114 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |