OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile.h" | 5 #include "chrome/browser/profile.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 // static | 204 // static |
205 URLRequestContextGetter* Profile::GetDefaultRequestContext() { | 205 URLRequestContextGetter* Profile::GetDefaultRequestContext() { |
206 return default_request_context_; | 206 return default_request_context_; |
207 } | 207 } |
208 | 208 |
209 #if defined(OS_WIN) | 209 #if defined(OS_WIN) |
210 #include "chrome/browser/password_manager/password_store_win.h" | 210 #include "chrome/browser/password_manager/password_store_win.h" |
211 #elif defined(OS_MACOSX) | 211 #elif defined(OS_MACOSX) |
212 #include "chrome/browser/keychain_mac.h" | 212 #include "chrome/browser/keychain_mac.h" |
213 #include "chrome/browser/password_manager/login_database_mac.h" | |
214 #include "chrome/browser/password_manager/password_store_mac.h" | 213 #include "chrome/browser/password_manager/password_store_mac.h" |
215 #elif defined(OS_POSIX) | 214 #elif defined(OS_POSIX) |
216 // Temporarily disabled while we figure some stuff out. | 215 // Temporarily disabled while we figure some stuff out. |
217 // http://code.google.com/p/chromium/issues/detail?id=12351 | 216 // http://code.google.com/p/chromium/issues/detail?id=12351 |
218 // #include "chrome/browser/password_manager/password_store_gnome.h" | 217 // #include "chrome/browser/password_manager/password_store_gnome.h" |
219 // #include "chrome/browser/password_manager/password_store_kwallet.h" | 218 // #include "chrome/browser/password_manager/password_store_kwallet.h" |
220 #endif | 219 #endif |
221 | 220 |
222 //////////////////////////////////////////////////////////////////////////////// | 221 //////////////////////////////////////////////////////////////////////////////// |
223 // | 222 // |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 | 1140 |
1142 void ProfileImpl::CreatePasswordStore() { | 1141 void ProfileImpl::CreatePasswordStore() { |
1143 DCHECK(!created_password_store_ && password_store_.get() == NULL); | 1142 DCHECK(!created_password_store_ && password_store_.get() == NULL); |
1144 created_password_store_ = true; | 1143 created_password_store_ = true; |
1145 scoped_refptr<PasswordStore> ps; | 1144 scoped_refptr<PasswordStore> ps; |
1146 #if defined(OS_WIN) | 1145 #if defined(OS_WIN) |
1147 ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS)); | 1146 ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS)); |
1148 #elif defined(OS_MACOSX) | 1147 #elif defined(OS_MACOSX) |
1149 FilePath login_db_file_path = GetPath(); | 1148 FilePath login_db_file_path = GetPath(); |
1150 login_db_file_path = login_db_file_path.Append(chrome::kLoginDataFileName); | 1149 login_db_file_path = login_db_file_path.Append(chrome::kLoginDataFileName); |
1151 LoginDatabaseMac* login_db = new LoginDatabaseMac(); | 1150 LoginDatabase* login_db = new LoginDatabase(); |
1152 if (!login_db->Init(login_db_file_path)) { | 1151 if (!login_db->Init(login_db_file_path)) { |
1153 LOG(ERROR) << "Could not initialize login database."; | 1152 LOG(ERROR) << "Could not initialize login database."; |
1154 delete login_db; | 1153 delete login_db; |
1155 return; | 1154 return; |
1156 } | 1155 } |
1157 ps = new PasswordStoreMac(new MacKeychain(), login_db); | 1156 ps = new PasswordStoreMac(new MacKeychain(), login_db); |
1158 #elif defined(OS_POSIX) | 1157 #elif defined(OS_POSIX) |
1159 // TODO(evanm): implement "native" password management. | 1158 // TODO(evanm): implement "native" password management. |
1160 // This bug describes the issues. | 1159 // This bug describes the issues. |
1161 // http://code.google.com/p/chromium/issues/detail?id=12351 | 1160 // http://code.google.com/p/chromium/issues/detail?id=12351 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 } | 1415 } |
1417 | 1416 |
1418 void ProfileImpl::InitSyncService() { | 1417 void ProfileImpl::InitSyncService() { |
1419 profile_sync_factory_.reset( | 1418 profile_sync_factory_.reset( |
1420 new ProfileSyncFactoryImpl(this, | 1419 new ProfileSyncFactoryImpl(this, |
1421 CommandLine::ForCurrentProcess())); | 1420 CommandLine::ForCurrentProcess())); |
1422 sync_service_.reset( | 1421 sync_service_.reset( |
1423 profile_sync_factory_->CreateProfileSyncService()); | 1422 profile_sync_factory_->CreateProfileSyncService()); |
1424 sync_service_->Initialize(); | 1423 sync_service_->Initialize(); |
1425 } | 1424 } |
OLD | NEW |