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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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/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/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 26 matching lines...) Expand all
37 37
38 PersonalDataManagerFactory::~PersonalDataManagerFactory() { 38 PersonalDataManagerFactory::~PersonalDataManagerFactory() {
39 } 39 }
40 40
41 KeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( 41 KeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor(
42 content::BrowserContext* context) const { 42 content::BrowserContext* context) const {
43 Profile* profile = Profile::FromBrowserContext(context); 43 Profile* profile = Profile::FromBrowserContext(context);
44 PersonalDataManager* service = 44 PersonalDataManager* service =
45 new PersonalDataManager(g_browser_process->GetApplicationLocale()); 45 new PersonalDataManager(g_browser_process->GetApplicationLocale());
46 service->Init(WebDataServiceFactory::GetAutofillWebDataForProfile( 46 service->Init(WebDataServiceFactory::GetAutofillWebDataForProfile(
47 profile, Profile::EXPLICIT_ACCESS), 47 profile, ServiceAccessType::EXPLICIT_ACCESS),
48 profile->GetPrefs(), 48 profile->GetPrefs(),
49 profile->IsOffTheRecord()); 49 profile->IsOffTheRecord());
50 return service; 50 return service;
51 } 51 }
52 52
53 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse( 53 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse(
54 content::BrowserContext* context) const { 54 content::BrowserContext* context) const {
55 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 55 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
56 } 56 }
57 57
58 } // namespace autofill 58 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider.cc ('k') | chrome/browser/bookmarks/bookmark_html_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698