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

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: compile (racing with incoming CLs) 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) 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "chrome/browser/password_manager/password_store_x.h" 14 #include "chrome/browser/password_manager/password_store_x.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 16
17 class Pickle; 17 class Pickle;
18 class PickleIterator;
18 class PrefService; 19 class PrefService;
19 20
20 namespace webkit { 21 namespace webkit {
21 namespace forms { 22 namespace forms {
22 struct PasswordForm; 23 struct PasswordForm;
23 } 24 }
24 } 25 }
25 26
26 namespace base { 27 namespace base {
27 class WaitableEvent; 28 class WaitableEvent;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Serializes a list of PasswordForms to be stored in the wallet. 123 // Serializes a list of PasswordForms to be stored in the wallet.
123 static void SerializeValue(const PasswordFormList& forms, Pickle* pickle); 124 static void SerializeValue(const PasswordFormList& forms, Pickle* pickle);
124 125
125 // Checks a serialized list of PasswordForms for sanity. Returns true if OK. 126 // 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. 127 // Note that |realm| is only used for generating a useful warning message.
127 static bool CheckSerializedValue(const uint8_t* byte_array, size_t length, 128 static bool CheckSerializedValue(const uint8_t* byte_array, size_t length,
128 const std::string& realm); 129 const std::string& realm);
129 130
130 // Convenience function to read a GURL from a Pickle. Assumes the URL has 131 // Convenience function to read a GURL from a Pickle. Assumes the URL has
131 // been written as a std::string. Returns true on success. 132 // been written as a std::string. Returns true on success.
132 static bool ReadGURL(const Pickle& pickle, void** iter, GURL* url); 133 static bool ReadGURL(const Pickle& pickle, PickleIterator* iter, GURL* url);
133 134
134 // In case the fields in the pickle ever change, version them so we can try to 135 // 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.) 136 // read old pickles. (Note: do not eat old pickles past the expiration date.)
136 static const int kPickleVersion = 0; 137 static const int kPickleVersion = 0;
137 138
138 // Name of the folder to store passwords in. 139 // Name of the folder to store passwords in.
139 static const char kKWalletFolder[]; 140 static const char kKWalletFolder[];
140 141
141 // DBus service, path, and interface names for klauncher and kwalletd. 142 // DBus service, path, and interface names for klauncher and kwalletd.
142 static const char kKWalletServiceName[]; 143 static const char kKWalletServiceName[];
(...skipping 28 matching lines...) Expand all
171 172
172 // The name of the wallet we've opened. Set during Init(). 173 // The name of the wallet we've opened. Set during Init().
173 std::string wallet_name_; 174 std::string wallet_name_;
174 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. 175 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs.
175 const std::string app_name_; 176 const std::string app_name_;
176 177
177 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); 178 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet);
178 }; 179 };
179 180
180 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ 181 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_
OLDNEW
« no previous file with comments | « chrome/browser/importer/profile_import_process_messages.h ('k') | chrome/browser/password_manager/native_backend_kwallet_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698