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

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

Issue 10857037: Make FaviconService a ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Override Shutdown() in FaviconService to NULL the profile_ pointer. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // ref only for right type, lifecycle is managed by prefs_ 241 // ref only for right type, lifecycle is managed by prefs_
242 TestingPrefService* testing_prefs_; 242 TestingPrefService* testing_prefs_;
243 243
244 private: 244 private:
245 // Common initialization between the two constructors. 245 // Common initialization between the two constructors.
246 void Init(); 246 void Init();
247 247
248 // Finishes initialization when a profile is created asynchronously. 248 // Finishes initialization when a profile is created asynchronously.
249 void FinishInit(); 249 void FinishInit();
250 250
251 // Destroys favicon service if it has been created.
252 void DestroyFaviconService();
253
254 // Creates a TestingPrefService and associates it with the TestingProfile. 251 // Creates a TestingPrefService and associates it with the TestingProfile.
255 void CreateTestingPrefService(); 252 void CreateTestingPrefService();
256 253
257 virtual base::Callback<ChromeURLDataManagerBackend*(void)> 254 virtual base::Callback<ChromeURLDataManagerBackend*(void)>
258 GetChromeURLDataManagerBackendGetter() const OVERRIDE; 255 GetChromeURLDataManagerBackendGetter() const OVERRIDE;
259 256
260 // The favicon service. Only created if CreateFaviconService is invoked.
261 scoped_ptr<FaviconService> favicon_service_;
262
263 // The policy service. Lazily created as a stub. 257 // The policy service. Lazily created as a stub.
264 scoped_ptr<policy::PolicyService> policy_service_; 258 scoped_ptr<policy::PolicyService> policy_service_;
265 259
266 // Internally, this is a TestURLRequestContextGetter that creates a dummy 260 // Internally, this is a TestURLRequestContextGetter that creates a dummy
267 // request context. Currently, only the CookieMonster is hooked up. 261 // request context. Currently, only the CookieMonster is hooked up.
268 scoped_refptr<net::URLRequestContextGetter> request_context_; 262 scoped_refptr<net::URLRequestContextGetter> request_context_;
269 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; 263 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
270 264
271 std::wstring id_; 265 std::wstring id_;
272 266
(...skipping 29 matching lines...) Expand all
302 // testing. 296 // testing.
303 ProfileDependencyManager* profile_dependency_manager_; 297 ProfileDependencyManager* profile_dependency_manager_;
304 298
305 scoped_ptr<content::MockResourceContext> resource_context_; 299 scoped_ptr<content::MockResourceContext> resource_context_;
306 300
307 // Weak pointer to a delegate for indicating that a profile was created. 301 // Weak pointer to a delegate for indicating that a profile was created.
308 Delegate* delegate_; 302 Delegate* delegate_;
309 }; 303 };
310 304
311 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 305 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698