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

Side by Side Diff: content/common/clipboard_messages.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/clipboard_messages.h ('k') | content/common/font_config_ipc_linux.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) 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 #include "content/common/clipboard_messages.h" 5 #include "content/common/clipboard_messages.h"
6 6
7 #include "ui/base/clipboard/clipboard.h" 7 #include "ui/base/clipboard/clipboard.h"
8 8
9 namespace IPC { 9 namespace IPC {
10 10
11 void ParamTraits<ui::Clipboard::FormatType>::Write( 11 void ParamTraits<ui::Clipboard::FormatType>::Write(
12 Message* m, const param_type& p) { 12 Message* m, const param_type& p) {
13 m->WriteString(p.Serialize()); 13 m->WriteString(p.Serialize());
14 } 14 }
15 15
16 bool ParamTraits<ui::Clipboard::FormatType>::Read( 16 bool ParamTraits<ui::Clipboard::FormatType>::Read(
17 const Message* m, void** iter, param_type* r) { 17 const Message* m, PickleIterator* iter, param_type* r) {
18 std::string serialization; 18 std::string serialization;
19 if (!ReadParam(m, iter, &serialization)) 19 if (!ReadParam(m, iter, &serialization))
20 return false; 20 return false;
21 *r = ui::Clipboard::FormatType::Deserialize(serialization); 21 *r = ui::Clipboard::FormatType::Deserialize(serialization);
22 return true; 22 return true;
23 } 23 }
24 24
25 void ParamTraits<ui::Clipboard::FormatType>::Log( 25 void ParamTraits<ui::Clipboard::FormatType>::Log(
26 const param_type& p, std::string* l) { 26 const param_type& p, std::string* l) {
27 *l = p.Serialize(); 27 *l = p.Serialize();
28 } 28 }
29 29
30 } // namespace IPC 30 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/clipboard_messages.h ('k') | content/common/font_config_ipc_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698