Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Side by Side Diff: chrome/browser/password_manager/password_store_factory.cc

Issue 10735034: Linux: Detect Unity as a desktop environment. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/nix/xdg_util.cc ('k') | chrome/browser/printing/printer_manager_dialog_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « base/nix/xdg_util.cc ('k') | chrome/browser/printing/printer_manager_dialog_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698