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

Side by Side Diff: ppapi/proxy/serialized_var.cc

Issue 825353003: Revert of Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « ppapi/proxy/serialized_flash_menu.cc ('k') | remoting/host/chromoting_param_traits.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 "ppapi/proxy/serialized_var.h" 5 #include "ppapi/proxy/serialized_var.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ipc/ipc_message_utils.h" 8 #include "ipc/ipc_message_utils.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/proxy/dispatcher.h" 10 #include "ppapi/proxy/dispatcher.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // 142 //
143 // One place this has happened in the past is using 143 // One place this has happened in the past is using
144 // std::vector<SerializedVar>.resize(). If you're doing this manually instead 144 // std::vector<SerializedVar>.resize(). If you're doing this manually instead
145 // of using the helper classes for handling in/out vectors of vars, be 145 // of using the helper classes for handling in/out vectors of vars, be
146 // sure you use the same pattern as the SerializedVarVector classes. 146 // sure you use the same pattern as the SerializedVarVector classes.
147 DCHECK(!has_been_deserialized_); 147 DCHECK(!has_been_deserialized_);
148 has_been_deserialized_ = true; 148 has_been_deserialized_ = true;
149 #endif 149 #endif
150 // When reading, the dispatcher should be set when we get a Deserialize 150 // When reading, the dispatcher should be set when we get a Deserialize
151 // call (which will supply a dispatcher). 151 // call (which will supply a dispatcher).
152 if (!iter->ReadBool(&is_valid_var_)) 152 if (!m->ReadBool(iter, &is_valid_var_))
153 return false; 153 return false;
154 if (is_valid_var_) { 154 if (is_valid_var_) {
155 raw_var_data_ = RawVarDataGraph::Read(m, iter); 155 raw_var_data_ = RawVarDataGraph::Read(m, iter);
156 if (!raw_var_data_) 156 if (!raw_var_data_)
157 return false; 157 return false;
158 } 158 }
159 159
160 return true; 160 return true;
161 } 161 }
162 162
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 const std::string& str) { 458 const std::string& str) {
459 inner_->ForceSetVarValueForTest(StringVar::StringToPPVar(str)); 459 inner_->ForceSetVarValueForTest(StringVar::StringToPPVar(str));
460 } 460 }
461 461
462 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) 462 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var)
463 : SerializedVar(var) { 463 : SerializedVar(var) {
464 } 464 }
465 465
466 } // namespace proxy 466 } // namespace proxy
467 } // namespace ppapi 467 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_flash_menu.cc ('k') | remoting/host/chromoting_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698