| 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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 class ObjectProxy; | 30 class ObjectProxy; |
| 31 } | 31 } |
| 32 | 32 |
| 33 // NativeBackend implementation using KWallet. | 33 // NativeBackend implementation using KWallet. |
| 34 class NativeBackendKWallet : public PasswordStoreX::NativeBackend { | 34 class NativeBackendKWallet : public PasswordStoreX::NativeBackend { |
| 35 public: | 35 public: |
| 36 explicit NativeBackendKWallet(LocalProfileId id); | 36 explicit NativeBackendKWallet(LocalProfileId id); |
| 37 | 37 |
| 38 virtual ~NativeBackendKWallet(); | 38 virtual ~NativeBackendKWallet(); |
| 39 | 39 |
| 40 virtual bool Init() OVERRIDE; | 40 virtual bool Init() override; |
| 41 | 41 |
| 42 // Implements NativeBackend interface. | 42 // Implements NativeBackend interface. |
| 43 virtual password_manager::PasswordStoreChangeList AddLogin( | 43 virtual password_manager::PasswordStoreChangeList AddLogin( |
| 44 const autofill::PasswordForm& form) OVERRIDE; | 44 const autofill::PasswordForm& form) override; |
| 45 virtual bool UpdateLogin( | 45 virtual bool UpdateLogin( |
| 46 const autofill::PasswordForm& form, | 46 const autofill::PasswordForm& form, |
| 47 password_manager::PasswordStoreChangeList* changes) OVERRIDE; | 47 password_manager::PasswordStoreChangeList* changes) override; |
| 48 virtual bool RemoveLogin(const autofill::PasswordForm& form) OVERRIDE; | 48 virtual bool RemoveLogin(const autofill::PasswordForm& form) override; |
| 49 virtual bool RemoveLoginsCreatedBetween( | 49 virtual bool RemoveLoginsCreatedBetween( |
| 50 base::Time delete_begin, | 50 base::Time delete_begin, |
| 51 base::Time delete_end, | 51 base::Time delete_end, |
| 52 password_manager::PasswordStoreChangeList* changes) OVERRIDE; | 52 password_manager::PasswordStoreChangeList* changes) override; |
| 53 virtual bool RemoveLoginsSyncedBetween( | 53 virtual bool RemoveLoginsSyncedBetween( |
| 54 base::Time delete_begin, | 54 base::Time delete_begin, |
| 55 base::Time delete_end, | 55 base::Time delete_end, |
| 56 password_manager::PasswordStoreChangeList* changes) OVERRIDE; | 56 password_manager::PasswordStoreChangeList* changes) override; |
| 57 virtual bool GetLogins(const autofill::PasswordForm& form, | 57 virtual bool GetLogins(const autofill::PasswordForm& form, |
| 58 PasswordFormList* forms) OVERRIDE; | 58 PasswordFormList* forms) override; |
| 59 virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE; | 59 virtual bool GetAutofillableLogins(PasswordFormList* forms) override; |
| 60 virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE; | 60 virtual bool GetBlacklistLogins(PasswordFormList* forms) override; |
| 61 | 61 |
| 62 protected: | 62 protected: |
| 63 // Invalid handle returned by WalletHandle(). | 63 // Invalid handle returned by WalletHandle(). |
| 64 static const int kInvalidKWalletHandle = -1; | 64 static const int kInvalidKWalletHandle = -1; |
| 65 | 65 |
| 66 // Internally used by Init(), but also for testing to provide a mock bus. | 66 // Internally used by Init(), but also for testing to provide a mock bus. |
| 67 bool InitWithBus(scoped_refptr<dbus::Bus> optional_bus); | 67 bool InitWithBus(scoped_refptr<dbus::Bus> optional_bus); |
| 68 | 68 |
| 69 // Deserializes a list of PasswordForms from the wallet. | 69 // Deserializes a list of PasswordForms from the wallet. |
| 70 static void DeserializeValue(const std::string& signon_realm, | 70 static void DeserializeValue(const std::string& signon_realm, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // The name of the wallet we've opened. Set during Init(). | 156 // The name of the wallet we've opened. Set during Init(). |
| 157 std::string wallet_name_; | 157 std::string wallet_name_; |
| 158 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. | 158 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. |
| 159 const std::string app_name_; | 159 const std::string app_name_; |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); | 161 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ | 164 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ |
| OLD | NEW |