summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-11 16:39:55 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-11 16:39:55 +0000
commit2dd33556af4a65f74203da2dae298bb622d4e162 (patch)
tree809d8e42ae79a2717aff55fc54c9edf582a1d22b /chrome_frame
parent7696c408db7500ec57f04e51bd17a4b6d25e1d17 (diff)
downloadchromium_src-2dd33556af4a65f74203da2dae298bb622d4e162.zip
chromium_src-2dd33556af4a65f74203da2dae298bb622d4e162.tar.gz
chromium_src-2dd33556af4a65f74203da2dae298bb622d4e162.tar.bz2
Try 2 - Change how ui::Clipboard is accessed so there's only one per thread.
Currently, there can be any number of Clipboard objects, which can be massively simplified. This removes interfaces for fetching the Clipboard and makes everyone go through a single static ui::Clipboard::GetForCurrentThread() access point. [Differences from the first patch: this may fix the pdf tests, but since I have no way to run them locally or on a trybot, this is going in blind.] BUG=130805 R=jam@chromium.org TBR=tc,ben,dcheng,kaiwang First Review URL: https://chromiumcodereview.appspot.com/10911074 Review URL: https://chromiumcodereview.appspot.com/10916214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index ec79019..d8d1e13 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) {