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

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

Issue 2740633002: [Autofill] Add upstreaming UKM (Closed)
Patch Set: Created 3 years, 9 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 29 matching lines...) Expand all
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 =
50 new PersonalDataManager(g_browser_process->GetApplicationLocale()); 50 new PersonalDataManager(g_browser_process->GetApplicationLocale(),
51 g_browser_process->ukm_service());
51 service->Init(WebDataServiceFactory::GetAutofillWebDataForProfile( 52 service->Init(WebDataServiceFactory::GetAutofillWebDataForProfile(
52 profile, ServiceAccessType::EXPLICIT_ACCESS), 53 profile, ServiceAccessType::EXPLICIT_ACCESS),
53 profile->GetPrefs(), 54 profile->GetPrefs(),
54 AccountTrackerServiceFactory::GetForProfile(profile), 55 AccountTrackerServiceFactory::GetForProfile(profile),
55 SigninManagerFactory::GetForProfile(profile), 56 SigninManagerFactory::GetForProfile(profile),
56 profile->IsOffTheRecord()); 57 profile->IsOffTheRecord());
57 return service; 58 return service;
58 } 59 }
59 60
60 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse( 61 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse(
61 content::BrowserContext* context) const { 62 content::BrowserContext* context) const {
62 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 63 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
63 } 64 }
64 65
65 } // namespace autofill 66 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698