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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // but that has a different size on 32- and 64-bit systems. So, now we always | 121 // but that has a different size on 32- and 64-bit systems. So, now we always |
122 // write a 64-bit quantity, but we support trying to read it as either size | 122 // write a 64-bit quantity, but we support trying to read it as either size |
123 // when reading old pickles that fail to deserialize using the native size. | 123 // when reading old pickles that fail to deserialize using the native size. |
124 static bool DeserializeValueSize(const std::string& signon_realm, | 124 static bool DeserializeValueSize(const std::string& signon_realm, |
125 const PickleIterator& iter, | 125 const PickleIterator& iter, |
126 int version, bool size_32, bool warn_only, | 126 int version, bool size_32, bool warn_only, |
127 PasswordFormList* forms); | 127 PasswordFormList* forms); |
128 | 128 |
129 // In case the fields in the pickle ever change, version them so we can try to | 129 // In case the fields in the pickle ever change, version them so we can try to |
130 // read old pickles. (Note: do not eat old pickles past the expiration date.) | 130 // read old pickles. (Note: do not eat old pickles past the expiration date.) |
131 static const int kPickleVersion = 2; | 131 static const int kPickleVersion = 3; |
132 | 132 |
133 // Generates a profile-specific folder name based on profile_id_. | 133 // Generates a profile-specific folder name based on profile_id_. |
134 std::string GetProfileSpecificFolderName() const; | 134 std::string GetProfileSpecificFolderName() const; |
135 | 135 |
136 // The local profile id, used to generate the folder name. | 136 // The local profile id, used to generate the folder name. |
137 const LocalProfileId profile_id_; | 137 const LocalProfileId profile_id_; |
138 | 138 |
139 // The KWallet folder name, possibly based on the local profile id. | 139 // The KWallet folder name, possibly based on the local profile id. |
140 std::string folder_name_; | 140 std::string folder_name_; |
141 | 141 |
142 // DBus handle for communication with klauncher and kwalletd. | 142 // DBus handle for communication with klauncher and kwalletd. |
143 scoped_refptr<dbus::Bus> session_bus_; | 143 scoped_refptr<dbus::Bus> session_bus_; |
144 // Object proxy for kwalletd. We do not own this. | 144 // Object proxy for kwalletd. We do not own this. |
145 dbus::ObjectProxy* kwallet_proxy_; | 145 dbus::ObjectProxy* kwallet_proxy_; |
146 | 146 |
147 // The name of the wallet we've opened. Set during Init(). | 147 // The name of the wallet we've opened. Set during Init(). |
148 std::string wallet_name_; | 148 std::string wallet_name_; |
149 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. | 149 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. |
150 const std::string app_name_; | 150 const std::string app_name_; |
151 | 151 |
152 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); | 152 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); |
153 }; | 153 }; |
154 | 154 |
155 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ | 155 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ |
OLD | NEW |