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

Side by Side Diff: chrome/browser/password_manager/native_backend_kwallet_x.h

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jar feedback Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Serializes a list of PasswordForms to be stored in the wallet. 122 // Serializes a list of PasswordForms to be stored in the wallet.
123 static void SerializeValue(const PasswordFormList& forms, Pickle* pickle); 123 static void SerializeValue(const PasswordFormList& forms, Pickle* pickle);
124 124
125 // Checks a serialized list of PasswordForms for sanity. Returns true if OK. 125 // Checks a serialized list of PasswordForms for sanity. Returns true if OK.
126 // Note that |realm| is only used for generating a useful warning message. 126 // Note that |realm| is only used for generating a useful warning message.
127 static bool CheckSerializedValue(const uint8_t* byte_array, size_t length, 127 static bool CheckSerializedValue(const uint8_t* byte_array, size_t length,
128 const std::string& realm); 128 const std::string& realm);
129 129
130 // Convenience function to read a GURL from a Pickle. Assumes the URL has 130 // Convenience function to read a GURL from a Pickle. Assumes the URL has
131 // been written as a std::string. Returns true on success. 131 // been written as a std::string. Returns true on success.
132 static bool ReadGURL(const Pickle& pickle, void** iter, GURL* url); 132 static bool ReadGURL(const Pickle& pickle, PickleReader* iter, GURL* url);
133 133
134 // In case the fields in the pickle ever change, version them so we can try to 134 // In case the fields in the pickle ever change, version them so we can try to
135 // read old pickles. (Note: do not eat old pickles past the expiration date.) 135 // read old pickles. (Note: do not eat old pickles past the expiration date.)
136 static const int kPickleVersion = 0; 136 static const int kPickleVersion = 0;
137 137
138 // Name of the folder to store passwords in. 138 // Name of the folder to store passwords in.
139 static const char kKWalletFolder[]; 139 static const char kKWalletFolder[];
140 140
141 // DBus service, path, and interface names for klauncher and kwalletd. 141 // DBus service, path, and interface names for klauncher and kwalletd.
142 static const char kKWalletServiceName[]; 142 static const char kKWalletServiceName[];
(...skipping 28 matching lines...) Expand all
171 171
172 // The name of the wallet we've opened. Set during Init(). 172 // The name of the wallet we've opened. Set during Init().
173 std::string wallet_name_; 173 std::string wallet_name_;
174 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. 174 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs.
175 const std::string app_name_; 175 const std::string app_name_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); 177 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet);
178 }; 178 };
179 179
180 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ 180 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698