| OLD | NEW |
| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 return default_request_context_; | 91 return default_request_context_; |
| 92 } | 92 } |
| 93 | 93 |
| 94 #if defined(OS_LINUX) | 94 #if defined(OS_LINUX) |
| 95 // Temporarily disabled while we figure some stuff out. | 95 // Temporarily disabled while we figure some stuff out. |
| 96 // http://code.google.com/p/chromium/issues/detail?id=12351 | 96 // http://code.google.com/p/chromium/issues/detail?id=12351 |
| 97 // #include "chrome/browser/password_manager/password_store_gnome.h" | 97 // #include "chrome/browser/password_manager/password_store_gnome.h" |
| 98 // #include "chrome/browser/password_manager/password_store_kwallet.h" | 98 // #include "chrome/browser/password_manager/password_store_kwallet.h" |
| 99 #elif defined(OS_WIN) | 99 #elif defined(OS_WIN) |
| 100 #include "chrome/browser/password_manager/password_store_win.h" | 100 #include "chrome/browser/password_manager/password_store_win.h" |
| 101 #elif defined(OS_MACOSX) |
| 102 #include "chrome/browser/keychain_mac.h" |
| 103 #include "chrome/browser/password_manager/password_store_mac.h" |
| 101 #endif | 104 #endif |
| 102 | 105 |
| 103 //////////////////////////////////////////////////////////////////////////////// | 106 //////////////////////////////////////////////////////////////////////////////// |
| 104 // | 107 // |
| 105 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile | 108 // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile |
| 106 // to make it suitable for the off the record mode. | 109 // to make it suitable for the off the record mode. |
| 107 // | 110 // |
| 108 //////////////////////////////////////////////////////////////////////////////// | 111 //////////////////////////////////////////////////////////////////////////////// |
| 109 class OffTheRecordProfileImpl : public Profile, | 112 class OffTheRecordProfileImpl : public Profile, |
| 110 public NotificationObserver { | 113 public NotificationObserver { |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 // Temporarily disabled while we figure some stuff out. | 795 // Temporarily disabled while we figure some stuff out. |
| 793 // http://code.google.com/p/chromium/issues/detail?id=12351 | 796 // http://code.google.com/p/chromium/issues/detail?id=12351 |
| 794 // if (getenv("KDE_FULL_SESSION")) { | 797 // if (getenv("KDE_FULL_SESSION")) { |
| 795 // ps = new PasswordStoreKWallet(); | 798 // ps = new PasswordStoreKWallet(); |
| 796 // } else { | 799 // } else { |
| 797 // ps = new PasswordStoreGnome(); | 800 // ps = new PasswordStoreGnome(); |
| 798 // } | 801 // } |
| 799 NOTIMPLEMENTED(); | 802 NOTIMPLEMENTED(); |
| 800 #elif defined(OS_WIN) | 803 #elif defined(OS_WIN) |
| 801 ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS)); | 804 ps = new PasswordStoreWin(GetWebDataService(Profile::IMPLICIT_ACCESS)); |
| 805 #elif defined(OS_MACOSX) |
| 806 ps = new PasswordStoreMac(new MacKeychain()); |
| 802 #else | 807 #else |
| 803 NOTIMPLEMENTED(); | 808 NOTIMPLEMENTED(); |
| 804 #endif | 809 #endif |
| 805 if (!ps || !ps->Init()) { | 810 if (!ps || !ps->Init()) { |
| 806 // Try falling back to the default password manager | 811 // Try falling back to the default password manager |
| 807 LOG(WARNING) << "Could not initialise native password manager - " | 812 LOG(WARNING) << "Could not initialise native password manager - " |
| 808 "falling back to default"; | 813 "falling back to default"; |
| 809 ps = new PasswordStoreDefault(GetWebDataService(Profile::IMPLICIT_ACCESS)); | 814 ps = new PasswordStoreDefault(GetWebDataService(Profile::IMPLICIT_ACCESS)); |
| 810 if (!ps->Init()) | 815 if (!ps->Init()) |
| 811 return; | 816 return; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 | 1051 |
| 1047 void ProfileImpl::StopCreateSessionServiceTimer() { | 1052 void ProfileImpl::StopCreateSessionServiceTimer() { |
| 1048 create_session_service_timer_.Stop(); | 1053 create_session_service_timer_.Stop(); |
| 1049 } | 1054 } |
| 1050 | 1055 |
| 1051 #ifdef CHROME_PERSONALIZATION | 1056 #ifdef CHROME_PERSONALIZATION |
| 1052 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { | 1057 ProfilePersonalization* ProfileImpl::GetProfilePersonalization() { |
| 1053 return personalization_.get(); | 1058 return personalization_.get(); |
| 1054 } | 1059 } |
| 1055 #endif | 1060 #endif |
| OLD | NEW |