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

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

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/page_state_serialization.h" 5 #include "content/common/page_state_serialization.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 struct SerializeObject { 160 struct SerializeObject {
161 SerializeObject() 161 SerializeObject()
162 : version(0), 162 : version(0),
163 parse_error(false) { 163 parse_error(false) {
164 } 164 }
165 165
166 SerializeObject(const char* data, int len) 166 SerializeObject(const char* data, int len)
167 : pickle(data, len), 167 : pickle(data, len),
168 version(0), 168 version(0),
169 parse_error(false) { 169 parse_error(false) {
170 iter = PickleIterator(pickle); 170 iter = base::PickleIterator(pickle);
171 } 171 }
172 172
173 std::string GetAsString() { 173 std::string GetAsString() {
174 return std::string(static_cast<const char*>(pickle.data()), pickle.size()); 174 return std::string(static_cast<const char*>(pickle.data()), pickle.size());
175 } 175 }
176 176
177 Pickle pickle; 177 base::Pickle pickle;
178 PickleIterator iter; 178 base::PickleIterator iter;
179 int version; 179 int version;
180 bool parse_error; 180 bool parse_error;
181 }; 181 };
182 182
183 // Version ID of serialized format. 183 // Version ID of serialized format.
184 // 11: Min version 184 // 11: Min version
185 // 12: Adds support for contains_passwords in HTTP body 185 // 12: Adds support for contains_passwords in HTTP body
186 // 13: Adds support for URL (FileSystem URL) 186 // 13: Adds support for URL (FileSystem URL)
187 // 14: Adds list of referenced files, version written only for first item. 187 // 14: Adds list of referenced files, version written only for first item.
188 // 15: Removes a bunch of values we defined but never used. 188 // 15: Removes a bunch of values we defined but never used.
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 float device_scale_factor, 749 float device_scale_factor,
750 ExplodedPageState* exploded) { 750 ExplodedPageState* exploded) {
751 g_device_scale_factor_for_testing = device_scale_factor; 751 g_device_scale_factor_for_testing = device_scale_factor;
752 bool rv = DecodePageState(encoded, exploded); 752 bool rv = DecodePageState(encoded, exploded);
753 g_device_scale_factor_for_testing = 0.0; 753 g_device_scale_factor_for_testing = 0.0;
754 return rv; 754 return rv;
755 } 755 }
756 #endif 756 #endif
757 757
758 } // namespace content 758 } // namespace content
OLDNEW
« no previous file with comments | « content/common/media/media_param_traits.cc ('k') | content/common/page_state_serialization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698