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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // but that has a different size on 32- and 64-bit systems. So, now we always | 130 // but that has a different size on 32- and 64-bit systems. So, now we always |
131 // write a 64-bit quantity, but we support trying to read it as either size | 131 // write a 64-bit quantity, but we support trying to read it as either size |
132 // when reading old pickles that fail to deserialize using the native size. | 132 // when reading old pickles that fail to deserialize using the native size. |
133 static bool DeserializeValueSize(const std::string& signon_realm, | 133 static bool DeserializeValueSize(const std::string& signon_realm, |
134 const PickleIterator& iter, | 134 const PickleIterator& iter, |
135 int version, bool size_32, bool warn_only, | 135 int version, bool size_32, bool warn_only, |
136 PasswordFormList* forms); | 136 PasswordFormList* forms); |
137 | 137 |
138 // In case the fields in the pickle ever change, version them so we can try to | 138 // In case the fields in the pickle ever change, version them so we can try to |
139 // read old pickles. (Note: do not eat old pickles past the expiration date.) | 139 // read old pickles. (Note: do not eat old pickles past the expiration date.) |
140 static const int kPickleVersion = 3; | 140 static const int kPickleVersion = 4; |
141 | 141 |
142 // Generates a profile-specific folder name based on profile_id_. | 142 // Generates a profile-specific folder name based on profile_id_. |
143 std::string GetProfileSpecificFolderName() const; | 143 std::string GetProfileSpecificFolderName() const; |
144 | 144 |
145 // The local profile id, used to generate the folder name. | 145 // The local profile id, used to generate the folder name. |
146 const LocalProfileId profile_id_; | 146 const LocalProfileId profile_id_; |
147 | 147 |
148 // The KWallet folder name, possibly based on the local profile id. | 148 // The KWallet folder name, possibly based on the local profile id. |
149 std::string folder_name_; | 149 std::string folder_name_; |
150 | 150 |
151 // DBus handle for communication with klauncher and kwalletd. | 151 // DBus handle for communication with klauncher and kwalletd. |
152 scoped_refptr<dbus::Bus> session_bus_; | 152 scoped_refptr<dbus::Bus> session_bus_; |
153 // Object proxy for kwalletd. We do not own this. | 153 // Object proxy for kwalletd. We do not own this. |
154 dbus::ObjectProxy* kwallet_proxy_; | 154 dbus::ObjectProxy* kwallet_proxy_; |
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 |