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

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

Powered by Google App Engine
This is Rietveld 408576698