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

Side by Side Diff: trunk/src/ipc/ipc_message_utils.cc

Issue 16034019: Revert 205772 "Revert "Revert 205443 "headless windows content_s..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/content/shell/shell_win.cc ('k') | no next file » | 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 "ipc/ipc_message_utils.h" 5 #include "ipc/ipc_message_utils.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/nullable_string16.h" 10 #include "base/nullable_string16.h"
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 bool ParamTraits<LOGFONT>::Read(const Message* m, PickleIterator* iter, 782 bool ParamTraits<LOGFONT>::Read(const Message* m, PickleIterator* iter,
783 param_type* r) { 783 param_type* r) {
784 const char *data; 784 const char *data;
785 int data_size = 0; 785 int data_size = 0;
786 if (m->ReadData(iter, &data, &data_size) && data_size == sizeof(LOGFONT)) { 786 if (m->ReadData(iter, &data, &data_size) && data_size == sizeof(LOGFONT)) {
787 const LOGFONT *font = reinterpret_cast<LOGFONT*>(const_cast<char*>(data)); 787 const LOGFONT *font = reinterpret_cast<LOGFONT*>(const_cast<char*>(data));
788 if (_tcsnlen(font->lfFaceName, LF_FACESIZE) < LF_FACESIZE) { 788 if (_tcsnlen(font->lfFaceName, LF_FACESIZE) < LF_FACESIZE) {
789 memcpy(r, data, sizeof(LOGFONT)); 789 memcpy(r, data, sizeof(LOGFONT));
790 return true; 790 return true;
791 } 791 }
792 std::wstring font_name(font->lfFaceName, LF_FACESIZE);
793 LOG(ERROR) << "Invalid LOGFONT '" << WideToUTF8(font_name) << "'";
794 } 792 }
795 793
796 NOTREACHED(); 794 NOTREACHED();
797 return false; 795 return false;
798 } 796 }
799 797
800 void ParamTraits<LOGFONT>::Log(const param_type& p, std::string* l) { 798 void ParamTraits<LOGFONT>::Log(const param_type& p, std::string* l) {
801 l->append(base::StringPrintf("<LOGFONT>")); 799 l->append(base::StringPrintf("<LOGFONT>"));
802 } 800 }
803 801
(...skipping 16 matching lines...) Expand all
820 return result; 818 return result;
821 } 819 }
822 820
823 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { 821 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) {
824 l->append("<MSG>"); 822 l->append("<MSG>");
825 } 823 }
826 824
827 #endif // OS_WIN 825 #endif // OS_WIN
828 826
829 } // namespace IPC 827 } // namespace IPC
OLDNEW
« no previous file with comments | « trunk/src/content/shell/shell_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698