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

Unified Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 10911074: Change how ui::Clipboard is accessed so there's only one per thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for kaiwang Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/testing_browser_process.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/chrome_frame_test_utils.cc
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index ec7901991751acb3abd31f1cef0fa08b825a80e2..d8d1e133b3d0a6dd05166e0eddfd76f72a04ceb1 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -491,19 +491,17 @@ std::wstring GetPathAndQueryFromUrl(const std::wstring& url) {
}
std::wstring GetClipboardText() {
- ui::Clipboard clipboard;
string16 text16;
- clipboard.ReadText(ui::Clipboard::BUFFER_STANDARD, &text16);
+ ui::Clipboard::GetForCurrentThread()->ReadText(
+ ui::Clipboard::BUFFER_STANDARD, &text16);
return UTF16ToWide(text16);
}
void SetClipboardText(const std::wstring& text) {
- ui::Clipboard clipboard;
- {
- ui::ScopedClipboardWriter clipboard_writer(&clipboard,
- ui::Clipboard::BUFFER_STANDARD);
- clipboard_writer.WriteText(WideToUTF16(text));
- }
+ ui::ScopedClipboardWriter clipboard_writer(
+ ui::Clipboard::GetForCurrentThread(),
+ ui::Clipboard::BUFFER_STANDARD);
+ clipboard_writer.WriteText(WideToUTF16(text));
}
bool AddCFMetaTag(std::string* html_data) {
« no previous file with comments | « chrome/test/base/testing_browser_process.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698