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

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

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ppapi/proxy/raw_var_data.h" 5 #include "ppapi/proxy/raw_var_data.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 void ResourceRawVarData::PopulatePPVar(const PP_Var& var, 711 void ResourceRawVarData::PopulatePPVar(const PP_Var& var,
712 const std::vector<PP_Var>& graph) { 712 const std::vector<PP_Var>& graph) {
713 } 713 }
714 714
715 void ResourceRawVarData::Write(IPC::Message* m, 715 void ResourceRawVarData::Write(IPC::Message* m,
716 const HandleWriter& handle_writer) { 716 const HandleWriter& handle_writer) {
717 m->WriteInt(static_cast<int>(pp_resource_)); 717 m->WriteInt(static_cast<int>(pp_resource_));
718 m->WriteInt(pending_renderer_host_id_); 718 m->WriteInt(pending_renderer_host_id_);
719 m->WriteInt(pending_browser_host_id_); 719 m->WriteInt(pending_browser_host_id_);
720 m->WriteBool(creation_message_); 720 m->WriteBool(!!creation_message_);
721 if (creation_message_) 721 if (creation_message_)
722 IPC::WriteParam(m, *creation_message_); 722 IPC::WriteParam(m, *creation_message_);
723 } 723 }
724 724
725 bool ResourceRawVarData::Read(PP_VarType type, 725 bool ResourceRawVarData::Read(PP_VarType type,
726 const IPC::Message* m, 726 const IPC::Message* m,
727 base::PickleIterator* iter) { 727 base::PickleIterator* iter) {
728 int value; 728 int value;
729 if (!iter->ReadInt(&value)) 729 if (!iter->ReadInt(&value))
730 return false; 730 return false;
(...skipping 10 matching lines...) Expand all
741 if (!IPC::ReadParam(m, iter, creation_message_.get())) 741 if (!IPC::ReadParam(m, iter, creation_message_.get()))
742 return false; 742 return false;
743 } else { 743 } else {
744 creation_message_.reset(); 744 creation_message_.reset();
745 } 745 }
746 return true; 746 return true;
747 } 747 }
748 748
749 } // namespace proxy 749 } // namespace proxy
750 } // namespace ppapi 750 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698