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

Side by Side Diff: content/common/ssl_status_serialization.cc

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
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/common/ssl_status_serialization.h" 5 #include "content/common/ssl_status_serialization.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 20 matching lines...) Expand all
31 // No SSL used. 31 // No SSL used.
32 *cert_id = 0; 32 *cert_id = 0;
33 // The following are not applicable and are set to the default values. 33 // The following are not applicable and are set to the default values.
34 *cert_status = 0; 34 *cert_status = 0;
35 *security_bits = -1; 35 *security_bits = -1;
36 *ssl_connection_status = 0; 36 *ssl_connection_status = 0;
37 return false; 37 return false;
38 } 38 }
39 39
40 Pickle pickle(state.data(), static_cast<int>(state.size())); 40 Pickle pickle(state.data(), static_cast<int>(state.size()));
41 void * iter = NULL; 41 PickleIterator iter(pickle);
42 return pickle.ReadInt(&iter, cert_id) && 42 return pickle.ReadInt(&iter, cert_id) &&
43 pickle.ReadUInt32(&iter, cert_status) && 43 pickle.ReadUInt32(&iter, cert_status) &&
44 pickle.ReadInt(&iter, security_bits) && 44 pickle.ReadInt(&iter, security_bits) &&
45 pickle.ReadInt(&iter, ssl_connection_status); 45 pickle.ReadInt(&iter, ssl_connection_status);
46 } 46 }
47 47
48 } // namespace content 48 } // namespace content
OLDNEW
« no previous file with comments | « content/common/resource_dispatcher.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698