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

Side by Side Diff: chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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) 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 "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_fil ter.h" 5 #include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_fil ter.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if (data[i].length() > kMaxClipboardWriteSize) { 309 if (data[i].length() > kMaxClipboardWriteSize) {
310 res = PP_ERROR_NOSPACE; 310 res = PP_ERROR_NOSPACE;
311 break; 311 break;
312 } 312 }
313 313
314 switch (formats[i]) { 314 switch (formats[i]) {
315 case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT: 315 case PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT:
316 scw.WriteText(UTF8ToUTF16(data[i])); 316 scw.WriteText(UTF8ToUTF16(data[i]));
317 break; 317 break;
318 case PP_FLASH_CLIPBOARD_FORMAT_HTML: 318 case PP_FLASH_CLIPBOARD_FORMAT_HTML:
319 scw.WriteHTML(UTF8ToUTF16(data[i]), ""); 319 scw.WriteHTML(UTF8ToUTF16(data[i]), std::string());
320 break; 320 break;
321 case PP_FLASH_CLIPBOARD_FORMAT_RTF: 321 case PP_FLASH_CLIPBOARD_FORMAT_RTF:
322 scw.WriteRTF(data[i]); 322 scw.WriteRTF(data[i]);
323 break; 323 break;
324 case PP_FLASH_CLIPBOARD_FORMAT_INVALID: 324 case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
325 res = PP_ERROR_BADARGUMENT; 325 res = PP_ERROR_BADARGUMENT;
326 break; 326 break;
327 default: 327 default:
328 if (custom_formats_.IsFormatRegistered(formats[i])) { 328 if (custom_formats_.IsFormatRegistered(formats[i])) {
329 std::string format_name = custom_formats_.GetFormatName(formats[i]); 329 std::string format_name = custom_formats_.GetFormatName(formats[i]);
(...skipping 21 matching lines...) Expand all
351 351
352 if (res != PP_OK) { 352 if (res != PP_OK) {
353 // Need to clear the objects so nothing is written. 353 // Need to clear the objects so nothing is written.
354 scw.Reset(); 354 scw.Reset();
355 } 355 }
356 356
357 return res; 357 return res;
358 } 358 }
359 359
360 } // namespace chrome 360 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/referrer_policy_browsertest.cc ('k') | chrome/browser/safe_browsing/browser_feature_extractor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698