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

Side by Side Diff: chrome/browser/profile.cc

Issue 147044: Wire up a LoginDatabase for PasswordStoreMac (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « chrome/browser/password_manager/password_store_mac.cc ('k') | chrome/common/chrome_constants.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 #if defined(OS_LINUX) 96 #if defined(OS_LINUX)
97 // Temporarily disabled while we figure some stuff out. 97 // Temporarily disabled while we figure some stuff out.
98 // http://code.google.com/p/chromium/issues/detail?id=12351 98 // http://code.google.com/p/chromium/issues/detail?id=12351
99 // #include "chrome/browser/password_manager/password_store_gnome.h" 99 // #include "chrome/browser/password_manager/password_store_gnome.h"
100 // #include "chrome/browser/password_manager/password_store_kwallet.h" 100 // #include "chrome/browser/password_manager/password_store_kwallet.h"
101 #elif defined(OS_WIN) 101 #elif defined(OS_WIN)
102 #include "chrome/browser/password_manager/password_store_win.h" 102 #include "chrome/browser/password_manager/password_store_win.h"
103 #elif defined(OS_MACOSX) 103 #elif defined(OS_MACOSX)
104 #include "chrome/browser/keychain_mac.h" 104 #include "chrome/browser/keychain_mac.h"
105 #include "chrome/browser/password_manager/login_database_mac.h"
105 #include "chrome/browser/password_manager/password_store_mac.h" 106 #include "chrome/browser/password_manager/password_store_mac.h"
106 #endif 107 #endif
107 108
108 //////////////////////////////////////////////////////////////////////////////// 109 ////////////////////////////////////////////////////////////////////////////////
109 // 110 //
110 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile 111 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile
111 // to make it suitable for the off the record mode. 112 // to make it suitable for the off the record mode.
112 // 113 //
113 //////////////////////////////////////////////////////////////////////////////// 114 ////////////////////////////////////////////////////////////////////////////////
114 class OffTheRecordProfileImpl : public Profile, 115 class OffTheRecordProfileImpl : public Profile,
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // http://code.google.com/p/chromium/issues/detail?id=12351 834 // http://code.google.com/p/chromium/issues/detail?id=12351
834 // if (getenv("KDE_FULL_SESSION")) { 835 // if (getenv("KDE_FULL_SESSION")) {
835 // ps = new PasswordStoreKWallet(); 836 // ps = new PasswordStoreKWallet();
836 // } else { 837 // } else {
837 // ps = new PasswordStoreGnome(); 838 // ps = new PasswordStoreGnome();
838 // } 839 // }
839 NOTIMPLEMENTED(); 840 NOTIMPLEMENTED();
840 #elif defined(OS_WIN) 841 #elif defined(OS_WIN)
841 ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS)); 842 ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS));
842 #elif defined(OS_MACOSX) 843 #elif defined(OS_MACOSX)
843 ps = new PasswordStoreMac(new MacKeychain()); 844 FilePath login_db_file_path = GetPath();
845 login_db_file_path = login_db_file_path.Append(chrome::kLoginDataFileName);
846 LoginDatabaseMac* login_db = new LoginDatabaseMac();
847 if (!login_db->Init(login_db_file_path)) {
848 LOG(ERROR) << "Could not initialize login database.";
849 delete login_db;
850 return;
851 }
852 ps = new PasswordStoreMac(new MacKeychain(), login_db);
844 #else 853 #else
845 NOTIMPLEMENTED(); 854 NOTIMPLEMENTED();
846 #endif 855 #endif
847 if (!ps || !ps->Init()) { 856 if (!ps || !ps->Init()) {
848 // Try falling back to the default password manager 857 // Try falling back to the default password manager
849 LOG(WARNING) << "Could not initialise native password manager - " 858 LOG(WARNING) << "Could not initialise native password manager - "
850 "falling back to default"; 859 "falling back to default";
851 ps = new PasswordStoreDefault(GetWebDataService(Profile::IMPLICIT_ACCESS)); 860 ps = new PasswordStoreDefault(GetWebDataService(Profile::IMPLICIT_ACCESS));
852 if (!ps->Init()) 861 if (!ps->Init())
853 return; 862 return;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 1105
1097 void ProfileImpl::StopCreateSessionServiceTimer() { 1106 void ProfileImpl::StopCreateSessionServiceTimer() {
1098 create_session_service_timer_.Stop(); 1107 create_session_service_timer_.Stop();
1099 } 1108 }
1100 1109
1101 #ifdef CHROME_PERSONALIZATION 1110 #ifdef CHROME_PERSONALIZATION
1102 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { 1111 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() {
1103 return personalization_.get(); 1112 return personalization_.get();
1104 } 1113 }
1105 #endif 1114 #endif
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698