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

Side by Side Diff: chrome/browser/user_style_sheet_watcher_factory.cc

Issue 13865012: Change GetProfileToUse method from Profile to content::BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trybots Created 7 years, 7 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
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 #include "chrome/browser/user_style_sheet_watcher_factory.h" 5 #include "chrome/browser/user_style_sheet_watcher_factory.h"
6 6
7 #include "chrome/browser/profiles/incognito_helpers.h"
7 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h" 9 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/user_style_sheet_watcher.h" 10 #include "chrome/browser/user_style_sheet_watcher.h"
10 11
11 // static 12 // static
12 scoped_refptr<UserStyleSheetWatcher> 13 scoped_refptr<UserStyleSheetWatcher>
13 UserStyleSheetWatcherFactory::GetForProfile( 14 UserStyleSheetWatcherFactory::GetForProfile(
14 Profile* profile) { 15 Profile* profile) {
15 return static_cast<UserStyleSheetWatcher*>( 16 return static_cast<UserStyleSheetWatcher*>(
16 GetInstance()->GetServiceForProfile(profile, true).get()); 17 GetInstance()->GetServiceForProfile(profile, true).get());
(...skipping 15 matching lines...) Expand all
32 scoped_refptr<RefcountedProfileKeyedService> 33 scoped_refptr<RefcountedProfileKeyedService>
33 UserStyleSheetWatcherFactory::BuildServiceInstanceFor( 34 UserStyleSheetWatcherFactory::BuildServiceInstanceFor(
34 content::BrowserContext* context) const { 35 content::BrowserContext* context) const {
35 Profile* profile = static_cast<Profile*>(context); 36 Profile* profile = static_cast<Profile*>(context);
36 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher( 37 scoped_refptr<UserStyleSheetWatcher> user_style_sheet_watcher(
37 new UserStyleSheetWatcher(profile, profile->GetPath())); 38 new UserStyleSheetWatcher(profile, profile->GetPath()));
38 user_style_sheet_watcher->Init(); 39 user_style_sheet_watcher->Init();
39 return user_style_sheet_watcher; 40 return user_style_sheet_watcher;
40 } 41 }
41 42
42 bool UserStyleSheetWatcherFactory::ServiceRedirectedInIncognito() const { 43 content::BrowserContext* UserStyleSheetWatcherFactory::GetBrowserContextToUse(
43 return true; 44 content::BrowserContext* context) const {
45 return chrome::GetBrowserContextRedirectedInIncognito(context);
44 } 46 }
45 47
46 bool UserStyleSheetWatcherFactory::ServiceIsNULLWhileTesting() const { 48 bool UserStyleSheetWatcherFactory::ServiceIsNULLWhileTesting() const {
47 return true; 49 return true;
48 } 50 }
OLDNEW
« no previous file with comments | « chrome/browser/user_style_sheet_watcher_factory.h ('k') | chrome/browser/webdata/web_data_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698