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_impl.h" | 5 #include "chrome/browser/profile_impl.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
88 #include "chrome/browser/password_manager/password_store_win.h" | 88 #include "chrome/browser/password_manager/password_store_win.h" |
89 #elif defined(OS_MACOSX) | 89 #elif defined(OS_MACOSX) |
90 #include "chrome/browser/keychain_mac.h" | 90 #include "chrome/browser/keychain_mac.h" |
91 #include "chrome/browser/password_manager/password_store_mac.h" | 91 #include "chrome/browser/password_manager/password_store_mac.h" |
92 #elif defined(OS_CHROMEOS) | 92 #elif defined(OS_CHROMEOS) |
93 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 93 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
94 #elif defined(OS_POSIX) && !defined(OS_CHROMEOS) | 94 #elif defined(OS_POSIX) && !defined(OS_CHROMEOS) |
95 #include "base/xdg_util.h" | 95 #include "base/xdg_util.h" |
| 96 #if defined(USE_GNOME_KEYRING) |
96 #include "chrome/browser/password_manager/native_backend_gnome_x.h" | 97 #include "chrome/browser/password_manager/native_backend_gnome_x.h" |
| 98 #endif |
97 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" | 99 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" |
98 #include "chrome/browser/password_manager/password_store_x.h" | 100 #include "chrome/browser/password_manager/password_store_x.h" |
99 #endif | 101 #endif |
100 | 102 |
101 using base::Time; | 103 using base::Time; |
102 using base::TimeDelta; | 104 using base::TimeDelta; |
103 | 105 |
104 namespace { | 106 namespace { |
105 | 107 |
106 void CleanupRequestContext(ChromeURLRequestContextGetter* context) { | 108 void CleanupRequestContext(ChromeURLRequestContextGetter* context) { |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 if (desktop_env == base::DESKTOP_ENVIRONMENT_KDE4) { | 960 if (desktop_env == base::DESKTOP_ENVIRONMENT_KDE4) { |
959 // KDE3 didn't use DBus, which our KWallet store uses. | 961 // KDE3 didn't use DBus, which our KWallet store uses. |
960 LOG(INFO) << "Trying KWallet for password storage."; | 962 LOG(INFO) << "Trying KWallet for password storage."; |
961 backend.reset(new NativeBackendKWallet()); | 963 backend.reset(new NativeBackendKWallet()); |
962 if (backend->Init()) | 964 if (backend->Init()) |
963 LOG(INFO) << "Using KWallet for password storage."; | 965 LOG(INFO) << "Using KWallet for password storage."; |
964 else | 966 else |
965 backend.reset(); | 967 backend.reset(); |
966 } else if (desktop_env == base::DESKTOP_ENVIRONMENT_GNOME || | 968 } else if (desktop_env == base::DESKTOP_ENVIRONMENT_GNOME || |
967 desktop_env == base::DESKTOP_ENVIRONMENT_XFCE) { | 969 desktop_env == base::DESKTOP_ENVIRONMENT_XFCE) { |
| 970 #if defined(USE_GNOME_KEYRING) |
968 LOG(INFO) << "Trying GNOME keyring for password storage."; | 971 LOG(INFO) << "Trying GNOME keyring for password storage."; |
969 backend.reset(new NativeBackendGnome()); | 972 backend.reset(new NativeBackendGnome()); |
970 if (backend->Init()) | 973 if (backend->Init()) |
971 LOG(INFO) << "Using GNOME keyring for password storage."; | 974 LOG(INFO) << "Using GNOME keyring for password storage."; |
972 else | 975 else |
973 backend.reset(); | 976 backend.reset(); |
| 977 #endif // defined(USE_GNOME_KEYRING) |
974 } | 978 } |
975 // TODO(mdm): this can change to a WARNING when we detect by default. | 979 // TODO(mdm): this can change to a WARNING when we detect by default. |
976 if (!backend.get()) | 980 if (!backend.get()) |
977 LOG(INFO) << "Using default (unencrypted) store for password storage."; | 981 LOG(INFO) << "Using default (unencrypted) store for password storage."; |
978 | 982 |
979 ps = new PasswordStoreX(login_db, this, | 983 ps = new PasswordStoreX(login_db, this, |
980 GetWebDataService(Profile::IMPLICIT_ACCESS), | 984 GetWebDataService(Profile::IMPLICIT_ACCESS), |
981 backend.release()); | 985 backend.release()); |
982 #else | 986 #else |
983 NOTIMPLEMENTED(); | 987 NOTIMPLEMENTED(); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 #if defined(OS_CHROMEOS) | 1288 #if defined(OS_CHROMEOS) |
1285 chromeos::ProxyConfigServiceImpl* | 1289 chromeos::ProxyConfigServiceImpl* |
1286 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1290 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
1287 if (!chromeos_proxy_config_service_impl_) { | 1291 if (!chromeos_proxy_config_service_impl_) { |
1288 chromeos_proxy_config_service_impl_ = | 1292 chromeos_proxy_config_service_impl_ = |
1289 new chromeos::ProxyConfigServiceImpl(); | 1293 new chromeos::ProxyConfigServiceImpl(); |
1290 } | 1294 } |
1291 return chromeos_proxy_config_service_impl_; | 1295 return chromeos_proxy_config_service_impl_; |
1292 } | 1296 } |
1293 #endif // defined(OS_CHROMEOS) | 1297 #endif // defined(OS_CHROMEOS) |
OLD | NEW |