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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "chrome/browser/profiles/profile_dependency_manager.h" | 8 #include "chrome/browser/profiles/profile_dependency_manager.h" |
9 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" | 9 #include "chrome/browser/webdata/autofill_web_data_service_impl.h" |
10 #include "chrome/browser/webdata/web_data_service.h" | 10 #include "chrome/browser/webdata/web_data_service.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 scoped_refptr<RefcountedProfileKeyedService> | 80 scoped_refptr<RefcountedProfileKeyedService> |
81 WebDataServiceFactory::BuildServiceInstanceFor(Profile* profile) const { | 81 WebDataServiceFactory::BuildServiceInstanceFor(Profile* profile) const { |
82 DCHECK(profile); | 82 DCHECK(profile); |
83 | 83 |
84 base::FilePath path = profile->GetPath(); | 84 base::FilePath path = profile->GetPath(); |
85 path = path.Append(chrome::kWebDataFilename); | 85 path = path.Append(chrome::kWebDataFilename); |
86 | 86 |
87 scoped_refptr<WebDataService> wds(new WebDataService()); | 87 scoped_refptr<WebDataService> wds(new WebDataService()); |
88 if (!wds->Init(profile->GetPath())) | 88 wds->Init(path); |
89 NOTREACHED(); | |
90 return wds.get(); | 89 return wds.get(); |
91 } | 90 } |
92 | 91 |
93 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { | 92 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { |
94 return true; | 93 return true; |
95 } | 94 } |
OLD | NEW |