| 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/password_manager/password_store_factory.h" | 5 #include "chrome/browser/password_manager/password_store_factory.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "chrome/browser/password_manager/login_database.h" | 9 #include "chrome/browser/password_manager/login_database.h" |
| 10 #include "chrome/browser/password_manager/password_store.h" | 10 #include "chrome/browser/password_manager/password_store.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 scoped_ptr<PasswordStoreX::NativeBackend> backend; | 147 scoped_ptr<PasswordStoreX::NativeBackend> backend; |
| 148 if (desktop_env == base::nix::DESKTOP_ENVIRONMENT_KDE4) { | 148 if (desktop_env == base::nix::DESKTOP_ENVIRONMENT_KDE4) { |
| 149 // KDE3 didn't use DBus, which our KWallet store uses. | 149 // KDE3 didn't use DBus, which our KWallet store uses. |
| 150 VLOG(1) << "Trying KWallet for password storage."; | 150 VLOG(1) << "Trying KWallet for password storage."; |
| 151 backend.reset(new NativeBackendKWallet(id, prefs)); | 151 backend.reset(new NativeBackendKWallet(id, prefs)); |
| 152 if (backend->Init()) | 152 if (backend->Init()) |
| 153 VLOG(1) << "Using KWallet for password storage."; | 153 VLOG(1) << "Using KWallet for password storage."; |
| 154 else | 154 else |
| 155 backend.reset(); | 155 backend.reset(); |
| 156 } else if (desktop_env == base::nix::DESKTOP_ENVIRONMENT_GNOME || | 156 } else if (desktop_env == base::nix::DESKTOP_ENVIRONMENT_GNOME || |
| 157 desktop_env == base::nix::DESKTOP_ENVIRONMENT_UNITY || |
| 157 desktop_env == base::nix::DESKTOP_ENVIRONMENT_XFCE) { | 158 desktop_env == base::nix::DESKTOP_ENVIRONMENT_XFCE) { |
| 158 #if defined(USE_GNOME_KEYRING) | 159 #if defined(USE_GNOME_KEYRING) |
| 159 VLOG(1) << "Trying GNOME keyring for password storage."; | 160 VLOG(1) << "Trying GNOME keyring for password storage."; |
| 160 backend.reset(new NativeBackendGnome(id, prefs)); | 161 backend.reset(new NativeBackendGnome(id, prefs)); |
| 161 if (backend->Init()) | 162 if (backend->Init()) |
| 162 VLOG(1) << "Using GNOME keyring for password storage."; | 163 VLOG(1) << "Using GNOME keyring for password storage."; |
| 163 else | 164 else |
| 164 backend.reset(); | 165 backend.reset(); |
| 165 #endif // defined(USE_GNOME_KEYRING) | 166 #endif // defined(USE_GNOME_KEYRING) |
| 166 } | 167 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 #endif | 200 #endif |
| 200 } | 201 } |
| 201 | 202 |
| 202 bool PasswordStoreFactory::ServiceRedirectedInIncognito() { | 203 bool PasswordStoreFactory::ServiceRedirectedInIncognito() { |
| 203 return true; | 204 return true; |
| 204 } | 205 } |
| 205 | 206 |
| 206 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() { | 207 bool PasswordStoreFactory::ServiceIsNULLWhileTesting() { |
| 207 return true; | 208 return true; |
| 208 } | 209 } |
| OLD | NEW |