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

Side by Side Diff: chrome/browser/autofill/autocheckout_whitelist_manager_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill/autocheckout_whitelist_manager_factory.h" 5 #include "chrome/browser/autofill/autocheckout_whitelist_manager_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_dependency_manager.h" 11 #include "chrome/browser/profiles/profile_dependency_manager.h"
11 #include "components/autofill/browser/autocheckout/whitelist_manager.h" 12 #include "components/autofill/browser/autocheckout/whitelist_manager.h"
12 13
13 namespace autofill { 14 namespace autofill {
14 namespace autocheckout { 15 namespace autocheckout {
15 16
16 class WhitelistManagerServiceImpl 17 class WhitelistManagerServiceImpl
17 : public WhitelistManagerService { 18 : public WhitelistManagerService {
18 public: 19 public:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 71 }
71 72
72 ProfileKeyedService* 73 ProfileKeyedService*
73 WhitelistManagerFactory::BuildServiceInstanceFor( 74 WhitelistManagerFactory::BuildServiceInstanceFor(
74 content::BrowserContext* profile) const { 75 content::BrowserContext* profile) const {
75 WhitelistManagerService* service = 76 WhitelistManagerService* service =
76 new WhitelistManagerServiceImpl(static_cast<Profile*>(profile)); 77 new WhitelistManagerServiceImpl(static_cast<Profile*>(profile));
77 return service; 78 return service;
78 } 79 }
79 80
80 bool WhitelistManagerFactory::ServiceRedirectedInIncognito() const { 81 content::BrowserContext* WhitelistManagerFactory::GetBrowserContextToUse(
81 return true; 82 content::BrowserContext* context) const {
83 return chrome::GetBrowserContextRedirectedInIncognito(context);
82 } 84 }
83 85
84 bool WhitelistManagerFactory::ServiceIsNULLWhileTesting() const { 86 bool WhitelistManagerFactory::ServiceIsNULLWhileTesting() const {
85 return true; 87 return true;
86 } 88 }
87 89
88 } // namespace autocheckout 90 } // namespace autocheckout
89 } // namespace autofill 91 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698