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

Side by Side Diff: content/common/mac/attributed_string_coder.h

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
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 #ifndef CONTENT_COMMON_MAC_ATTRIBUTED_STRING_CODER_H_ 5 #ifndef CONTENT_COMMON_MAC_ATTRIBUTED_STRING_CODER_H_
6 #define CONTENT_COMMON_MAC_ATTRIBUTED_STRING_CODER_H_ 6 #define CONTENT_COMMON_MAC_ATTRIBUTED_STRING_CODER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } // namespace mac 95 } // namespace mac
96 96
97 // IPC ParamTraits specialization ////////////////////////////////////////////// 97 // IPC ParamTraits specialization //////////////////////////////////////////////
98 98
99 namespace IPC { 99 namespace IPC {
100 100
101 template <> 101 template <>
102 struct ParamTraits<mac::AttributedStringCoder::EncodedString> { 102 struct ParamTraits<mac::AttributedStringCoder::EncodedString> {
103 typedef mac::AttributedStringCoder::EncodedString param_type; 103 typedef mac::AttributedStringCoder::EncodedString param_type;
104 static void Write(Message* m, const param_type& p); 104 static void Write(Message* m, const param_type& p);
105 static bool Read(const Message* m, void** iter, param_type* r); 105 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
106 static void Log(const param_type& p, std::string* l); 106 static void Log(const param_type& p, std::string* l);
107 }; 107 };
108 108
109 template <> 109 template <>
110 struct ParamTraits<mac::AttributedStringCoder::FontAttribute> { 110 struct ParamTraits<mac::AttributedStringCoder::FontAttribute> {
111 typedef mac::AttributedStringCoder::FontAttribute param_type; 111 typedef mac::AttributedStringCoder::FontAttribute param_type;
112 static void Write(Message* m, const param_type& p); 112 static void Write(Message* m, const param_type& p);
113 static bool Read(const Message* m, void** iter, param_type* r); 113 static bool Read(const Message* m, PickleIterator* iter, param_type* r);
114 static void Log(const param_type& p, std::string* l); 114 static void Log(const param_type& p, std::string* l);
115 }; 115 };
116 116
117 } // namespace IPC 117 } // namespace IPC
118 118
119 #endif // CONTENT_COMMON_MAC_ATTRIBUTED_STRING_CODER_H_ 119 #endif // CONTENT_COMMON_MAC_ATTRIBUTED_STRING_CODER_H_
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_param_traits.cc ('k') | content/common/mac/attributed_string_coder.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698