Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/webdata/web_data_service_factory.h" | 5 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "chrome/browser/profiles/profile_dependency_manager.h" | 9 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 10 #include "chrome/browser/ui/profile_error_dialog.h" | 10 #include "chrome/browser/ui/profile_error_dialog.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 AutocompleteSyncableService::CreateForWebDataService(web_data); | 41 AutocompleteSyncableService::CreateForWebDataService(web_data); |
| 42 AutofillProfileSyncableService::CreateForWebDataService(web_data); | 42 AutofillProfileSyncableService::CreateForWebDataService(web_data); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 WebDataServiceWrapper::WebDataServiceWrapper() {} | 47 WebDataServiceWrapper::WebDataServiceWrapper() {} |
| 48 | 48 |
| 49 WebDataServiceWrapper::WebDataServiceWrapper(Profile* profile) { | 49 WebDataServiceWrapper::WebDataServiceWrapper(Profile* profile) { |
| 50 base::FilePath path = profile->GetPath(); | 50 base::FilePath path = profile->GetPath(); |
| 51 path = path.Append(chrome::kWebDataFilename); | 51 path = path.Append(kWebDataFilename); |
|
Ilya Sherman
2013/03/22 01:34:35
nit: Why is this diff part of this CL?
Jói
2013/03/22 10:49:56
Sorry, this was a bug in a local upstream branch.
| |
| 52 web_data_service_ = | 52 web_data_service_ = |
| 53 new WebDataService(path, base::Bind(&ProfileErrorCallback)); | 53 new WebDataService(path, base::Bind(&ProfileErrorCallback)); |
| 54 | 54 |
| 55 // All table objects that participate in managing the database must be added | 55 // All table objects that participate in managing the database must be added |
| 56 // here. | 56 // here. |
| 57 web_data_service_->AddTable( | 57 web_data_service_->AddTable( |
| 58 scoped_ptr<WebDatabaseTable>(new AutofillTable())); | 58 scoped_ptr<WebDatabaseTable>(new AutofillTable())); |
| 59 web_data_service_->AddTable( | 59 web_data_service_->AddTable( |
| 60 scoped_ptr<WebDatabaseTable>(new KeywordTable())); | 60 scoped_ptr<WebDatabaseTable>(new KeywordTable())); |
| 61 // TODO(mdm): We only really need the LoginsTable on Windows for IE7 password | 61 // TODO(mdm): We only really need the LoginsTable on Windows for IE7 password |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 } | 169 } |
| 170 | 170 |
| 171 ProfileKeyedService* | 171 ProfileKeyedService* |
| 172 WebDataServiceFactory::BuildServiceInstanceFor(Profile* profile) const { | 172 WebDataServiceFactory::BuildServiceInstanceFor(Profile* profile) const { |
| 173 return new WebDataServiceWrapper(profile); | 173 return new WebDataServiceWrapper(profile); |
| 174 } | 174 } |
| 175 | 175 |
| 176 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { | 176 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { |
| 177 return true; | 177 return true; |
| 178 } | 178 } |
| OLD | NEW |