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

Side by Side Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 9232075: Have ScopedClipboardWriter and Clipboard::WriteObjects take a buffer parameter. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix build error Created 8 years, 10 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_frame/test/chrome_frame_test_utils.h" 5 #include "chrome_frame/test/chrome_frame_test_utils.h"
6 6
7 #include <atlapp.h> 7 #include <atlapp.h>
8 #include <atlmisc.h> 8 #include <atlmisc.h>
9 #include <iepmapi.h> 9 #include <iepmapi.h>
10 #include <sddl.h> 10 #include <sddl.h>
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 std::wstring GetClipboardText() { 486 std::wstring GetClipboardText() {
487 ui::Clipboard clipboard; 487 ui::Clipboard clipboard;
488 string16 text16; 488 string16 text16;
489 clipboard.ReadText(ui::Clipboard::BUFFER_STANDARD, &text16); 489 clipboard.ReadText(ui::Clipboard::BUFFER_STANDARD, &text16);
490 return UTF16ToWide(text16); 490 return UTF16ToWide(text16);
491 } 491 }
492 492
493 void SetClipboardText(const std::wstring& text) { 493 void SetClipboardText(const std::wstring& text) {
494 ui::Clipboard clipboard; 494 ui::Clipboard clipboard;
495 { 495 {
496 ui::ScopedClipboardWriter clipboard_writer(&clipboard); 496 ui::ScopedClipboardWriter clipboard_writer(&clipboard,
497 ui::Clipboard::BUFFER_STANDARD);
497 clipboard_writer.WriteText(WideToUTF16(text)); 498 clipboard_writer.WriteText(WideToUTF16(text));
498 } 499 }
499 } 500 }
500 501
501 bool AddCFMetaTag(std::string* html_data) { 502 bool AddCFMetaTag(std::string* html_data) {
502 if (!html_data) { 503 if (!html_data) {
503 NOTREACHED(); 504 NOTREACHED();
504 return false; 505 return false;
505 } 506 }
506 std::string lower = StringToLowerASCII(*html_data); 507 std::string lower = StringToLowerASCII(*html_data);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 wchar_t local_app_data_path[MAX_PATH + 1] = {0}; 658 wchar_t local_app_data_path[MAX_PATH + 1] = {0};
658 SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, 659 SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT,
659 local_app_data_path); 660 local_app_data_path);
660 661
661 std::wstring session_history_path = local_app_data_path; 662 std::wstring session_history_path = local_app_data_path;
662 session_history_path += L"\\Microsoft\\Internet Explorer\\Recovery"; 663 session_history_path += L"\\Microsoft\\Internet Explorer\\Recovery";
663 file_util::Delete(session_history_path, true); 664 file_util::Delete(session_history_path, true);
664 } 665 }
665 666
666 } // namespace chrome_frame_test 667 } // namespace chrome_frame_test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698