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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.h

Issue 1165913002: [Cleanup] Used scoped pointers in KeyedServiceFactory's SetTestingFactory functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish renaming profile -> context Created 5 years, 6 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 (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
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_
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | chrome/browser/sync/test_profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698