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

Side by Side Diff: chrome/test/base/testing_profile.h

Issue 10546083: Convert ProtocolHandlerRegistry to be a ProfileKeyedService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with upstream. Created 8 years, 5 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_TEST_BASE_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Creates the BookmkarBarModel. If not invoked the bookmark bar model is 89 // Creates the BookmkarBarModel. If not invoked the bookmark bar model is
90 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then 90 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then
91 // the model is created. As TestingProfile deletes the directory containing 91 // the model is created. As TestingProfile deletes the directory containing
92 // the files used by HistoryService, the boolean only matters if you're 92 // the files used by HistoryService, the boolean only matters if you're
93 // recreating the BookmarkModel. 93 // recreating the BookmarkModel.
94 // 94 //
95 // NOTE: this does not block until the bookmarks are loaded. For that use 95 // NOTE: this does not block until the bookmarks are loaded. For that use
96 // BlockUntilBookmarkModelLoaded. 96 // BlockUntilBookmarkModelLoaded.
97 void CreateBookmarkModel(bool delete_file); 97 void CreateBookmarkModel(bool delete_file);
98 98
99 // Creates a ProtocolHandlerRegistry. If not invoked the protocol handler
100 // registry is NULL.
101 void CreateProtocolHandlerRegistry();
102
103 // Creates a WebDataService. If not invoked, the web data service is NULL. 99 // Creates a WebDataService. If not invoked, the web data service is NULL.
104 void CreateWebDataService(); 100 void CreateWebDataService();
105 101
106 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from 102 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from
107 // CreateBookmarkModel. 103 // CreateBookmarkModel.
108 void BlockUntilBookmarkModelLoaded(); 104 void BlockUntilBookmarkModelLoaded();
109 105
110 // Blocks until TopSites finishes loading. 106 // Blocks until TopSites finishes loading.
111 void BlockUntilTopSitesLoaded(); 107 void BlockUntilTopSitesLoaded();
112 108
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 virtual void MergeResourceString(int message_id, 190 virtual void MergeResourceString(int message_id,
195 std::wstring* output_string) {} 191 std::wstring* output_string) {}
196 virtual void MergeResourceInteger(int message_id, int* output_value) {} 192 virtual void MergeResourceInteger(int message_id, int* output_value) {}
197 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} 193 virtual void MergeResourceBoolean(int message_id, bool* output_value) {}
198 virtual BookmarkModel* GetBookmarkModel() OVERRIDE; 194 virtual BookmarkModel* GetBookmarkModel() OVERRIDE;
199 virtual bool IsSameProfile(Profile *p) OVERRIDE; 195 virtual bool IsSameProfile(Profile *p) OVERRIDE;
200 virtual base::Time GetStartTime() const OVERRIDE; 196 virtual base::Time GetStartTime() const OVERRIDE;
201 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; 197 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE;
202 virtual void MarkAsCleanShutdown() OVERRIDE {} 198 virtual void MarkAsCleanShutdown() OVERRIDE {}
203 virtual void InitPromoResources() OVERRIDE {} 199 virtual void InitPromoResources() OVERRIDE {}
204 virtual void InitRegisteredProtocolHandlers() OVERRIDE {}
205 200
206 virtual FilePath last_selected_directory() OVERRIDE; 201 virtual FilePath last_selected_directory() OVERRIDE;
207 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; 202 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE;
208 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; 203 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE;
209 #if defined(OS_CHROMEOS) 204 #if defined(OS_CHROMEOS)
210 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE { 205 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE {
211 } 206 }
212 virtual void InitChromeOSPreferences() OVERRIDE { 207 virtual void InitChromeOSPreferences() OVERRIDE {
213 } 208 }
214 virtual void ChangeAppLocale(const std::string&, 209 virtual void ChangeAppLocale(const std::string&,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 244
250 // Creates a TestingPrefService and associates it with the TestingProfile. 245 // Creates a TestingPrefService and associates it with the TestingProfile.
251 void CreateTestingPrefService(); 246 void CreateTestingPrefService();
252 247
253 virtual base::Callback<ChromeURLDataManagerBackend*(void)> 248 virtual base::Callback<ChromeURLDataManagerBackend*(void)>
254 GetChromeURLDataManagerBackendGetter() const OVERRIDE; 249 GetChromeURLDataManagerBackendGetter() const OVERRIDE;
255 250
256 // The favicon service. Only created if CreateFaviconService is invoked. 251 // The favicon service. Only created if CreateFaviconService is invoked.
257 scoped_ptr<FaviconService> favicon_service_; 252 scoped_ptr<FaviconService> favicon_service_;
258 253
259 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry
260 // is invoked.
261 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
262
263 // The policy service. Lazily created as a stub. 254 // The policy service. Lazily created as a stub.
264 scoped_ptr<policy::PolicyService> policy_service_; 255 scoped_ptr<policy::PolicyService> policy_service_;
265 256
266 // Internally, this is a TestURLRequestContextGetter that creates a dummy 257 // Internally, this is a TestURLRequestContextGetter that creates a dummy
267 // request context. Currently, only the CookieMonster is hooked up. 258 // request context. Currently, only the CookieMonster is hooked up.
268 scoped_refptr<net::URLRequestContextGetter> request_context_; 259 scoped_refptr<net::URLRequestContextGetter> request_context_;
269 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; 260 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
270 261
271 std::wstring id_; 262 std::wstring id_;
272 263
(...skipping 29 matching lines...) Expand all
302 // testing. 293 // testing.
303 ProfileDependencyManager* profile_dependency_manager_; 294 ProfileDependencyManager* profile_dependency_manager_;
304 295
305 scoped_ptr<content::MockResourceContext> resource_context_; 296 scoped_ptr<content::MockResourceContext> resource_context_;
306 297
307 // Weak pointer to a delegate for indicating that a profile was created. 298 // Weak pointer to a delegate for indicating that a profile was created.
308 Delegate* delegate_; 299 Delegate* delegate_;
309 }; 300 };
310 301
311 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 302 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698