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

Side by Side Diff: chrome/browser/autofill/personal_data_manager_factory.cc

Issue 2338283003: [Payments] Normalize addresses before passing them to merchants. (Closed)
Patch Set: Addressed vabr@'s comments Created 4 years, 2 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 #include "chrome/browser/autofill/personal_data_manager_factory.h" 5 #include "chrome/browser/autofill/personal_data_manager_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 28 matching lines...) Expand all
39 DependsOn(SigninManagerFactory::GetInstance()); 39 DependsOn(SigninManagerFactory::GetInstance());
40 DependsOn(WebDataServiceFactory::GetInstance()); 40 DependsOn(WebDataServiceFactory::GetInstance());
41 } 41 }
42 42
43 PersonalDataManagerFactory::~PersonalDataManagerFactory() { 43 PersonalDataManagerFactory::~PersonalDataManagerFactory() {
44 } 44 }
45 45
46 KeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( 46 KeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor(
47 content::BrowserContext* context) const { 47 content::BrowserContext* context) const {
48 Profile* profile = Profile::FromBrowserContext(context); 48 Profile* profile = Profile::FromBrowserContext(context);
49 PersonalDataManager* service = 49 PersonalDataManager* service = new PersonalDataManager(
50 new PersonalDataManager(g_browser_process->GetApplicationLocale()); 50 g_browser_process->GetApplicationLocale(), profile->GetRequestContext());
51 service->Init(WebDataServiceFactory::GetAutofillWebDataForProfile( 51 service->Init(WebDataServiceFactory::GetAutofillWebDataForProfile(
52 profile, ServiceAccessType::EXPLICIT_ACCESS), 52 profile, ServiceAccessType::EXPLICIT_ACCESS),
53 profile->GetPrefs(), 53 profile->GetPrefs(),
54 AccountTrackerServiceFactory::GetForProfile(profile), 54 AccountTrackerServiceFactory::GetForProfile(profile),
55 SigninManagerFactory::GetForProfile(profile), 55 SigninManagerFactory::GetForProfile(profile),
56 profile->IsOffTheRecord()); 56 profile->IsOffTheRecord());
57 return service; 57 return service;
58 } 58 }
59 59
60 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse( 60 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse(
61 content::BrowserContext* context) const { 61 content::BrowserContext* context) const {
62 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 62 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
63 } 63 }
64 64
65 } // namespace autofill 65 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698