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

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

Issue 72613006: Eliminate AutofillWebDataService::FromBrowserContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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/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 17 matching lines...) Expand all
28 28
29 private: 29 private:
30 scoped_ptr<PersonalDataManager> personal_data_manager_; 30 scoped_ptr<PersonalDataManager> personal_data_manager_;
31 }; 31 };
32 32
33 PersonalDataManagerServiceImpl::PersonalDataManagerServiceImpl( 33 PersonalDataManagerServiceImpl::PersonalDataManagerServiceImpl(
34 Profile* profile) { 34 Profile* profile) {
35 personal_data_manager_.reset(new PersonalDataManager( 35 personal_data_manager_.reset(new PersonalDataManager(
36 g_browser_process->GetApplicationLocale())); 36 g_browser_process->GetApplicationLocale()));
37 personal_data_manager_->Init( 37 personal_data_manager_->Init(
38 AutofillWebDataService::FromBrowserContext(profile), 38 WebDataServiceFactory::GetAutofillWebDataForProfile(
39 profile, Profile::EXPLICIT_ACCESS),
39 profile->GetPrefs(), 40 profile->GetPrefs(),
40 profile->IsOffTheRecord()); 41 profile->IsOffTheRecord());
41 } 42 }
42 43
43 PersonalDataManagerServiceImpl::~PersonalDataManagerServiceImpl() {} 44 PersonalDataManagerServiceImpl::~PersonalDataManagerServiceImpl() {}
44 45
45 void PersonalDataManagerServiceImpl::Shutdown() { 46 void PersonalDataManagerServiceImpl::Shutdown() {
46 personal_data_manager_.reset(); 47 personal_data_manager_.reset();
47 } 48 }
48 49
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 new PersonalDataManagerServiceImpl(static_cast<Profile*>(profile)); 88 new PersonalDataManagerServiceImpl(static_cast<Profile*>(profile));
88 return service; 89 return service;
89 } 90 }
90 91
91 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse( 92 content::BrowserContext* PersonalDataManagerFactory::GetBrowserContextToUse(
92 content::BrowserContext* context) const { 93 content::BrowserContext* context) const {
93 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 94 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
94 } 95 }
95 96
96 } // namespace autofill 97 } // namespace autofill
OLDNEW
« no previous file with comments | « android_webview/native/aw_form_database.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698