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

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

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 (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/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 "chrome/browser/webdata/web_data_service_factory.h" 12 #include "chrome/browser/webdata/web_data_service_factory.h"
12 #include "components/autofill/browser/personal_data_manager.h" 13 #include "components/autofill/browser/personal_data_manager.h"
13 14
14 namespace { 15 namespace {
15 16
16 class PersonalDataManagerServiceImpl : public PersonalDataManagerService { 17 class PersonalDataManagerServiceImpl : public PersonalDataManagerService {
17 public: 18 public:
18 PersonalDataManagerServiceImpl(Profile* profile); 19 PersonalDataManagerServiceImpl(Profile* profile);
19 virtual ~PersonalDataManagerServiceImpl(); 20 virtual ~PersonalDataManagerServiceImpl();
20 21
21 // PersonalDataManagerService: 22 // PersonalDataManagerService:
22 virtual void Shutdown() OVERRIDE; 23 virtual void Shutdown() OVERRIDE;
23 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE; 24 virtual PersonalDataManager* GetPersonalDataManager() OVERRIDE;
24 25
25 private: 26 private:
26 scoped_ptr<PersonalDataManager> personal_data_manager_; 27 scoped_ptr<PersonalDataManager> personal_data_manager_;
27 }; 28 };
28 29
29 PersonalDataManagerServiceImpl::PersonalDataManagerServiceImpl( 30 PersonalDataManagerServiceImpl::PersonalDataManagerServiceImpl(
30 Profile* profile) { 31 Profile* profile) {
31 personal_data_manager_.reset(new PersonalDataManager()); 32 personal_data_manager_.reset(new PersonalDataManager(
33 g_browser_process->GetApplicationLocale()));
32 personal_data_manager_->Init(profile); 34 personal_data_manager_->Init(profile);
33 } 35 }
34 36
35 PersonalDataManagerServiceImpl::~PersonalDataManagerServiceImpl() {} 37 PersonalDataManagerServiceImpl::~PersonalDataManagerServiceImpl() {}
36 38
37 void PersonalDataManagerServiceImpl::Shutdown() { 39 void PersonalDataManagerServiceImpl::Shutdown() {
38 personal_data_manager_.reset(); 40 personal_data_manager_.reset();
39 } 41 }
40 42
41 PersonalDataManager* PersonalDataManagerServiceImpl::GetPersonalDataManager() { 43 PersonalDataManager* PersonalDataManagerServiceImpl::GetPersonalDataManager() {
(...skipping 29 matching lines...) Expand all
71 73
72 PersonalDataManagerFactory::~PersonalDataManagerFactory() { 74 PersonalDataManagerFactory::~PersonalDataManagerFactory() {
73 } 75 }
74 76
75 ProfileKeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor( 77 ProfileKeyedService* PersonalDataManagerFactory::BuildServiceInstanceFor(
76 Profile* profile) const { 78 Profile* profile) const {
77 PersonalDataManagerService* service = 79 PersonalDataManagerService* service =
78 new PersonalDataManagerServiceImpl(profile); 80 new PersonalDataManagerServiceImpl(profile);
79 return service; 81 return service;
80 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698