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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 174367: Change the ChromiumPasteboard to have a notion of an alternate clipboard... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/autocomplete/autocomplete_edit_view_win.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit_view_win.cc (revision 25640)
+++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy)
@@ -2180,9 +2180,10 @@
std::wstring AutocompleteEditViewWin::GetClipboardText() const {
// Try text format.
Clipboard* clipboard = g_browser_process->clipboard();
- if (clipboard->IsFormatAvailable(Clipboard::GetPlainTextWFormatType())) {
+ if (clipboard->IsFormatAvailable(Clipboard::GetPlainTextWFormatType(),
+ Clipboard::BUFFER_STANDARD)) {
std::wstring text;
- clipboard->ReadText(&text);
+ clipboard->ReadText(Clipboard::BUFFER_STANDARD, &text);
// Note: Unlike in the find popup and textfield view, here we completely
// remove whitespace strings containing newlines. We assume users are
@@ -2200,7 +2201,8 @@
// and pastes from the URL bar to itself, the text will get fixed up and
// cannonicalized, which is not what the user expects. By pasting in this
// order, we are sure to paste what the user copied.
- if (clipboard->IsFormatAvailable(Clipboard::GetUrlWFormatType())) {
+ if (clipboard->IsFormatAvailable(Clipboard::GetUrlWFormatType(),
+ Clipboard::BUFFER_STANDARD)) {
std::string url_str;
clipboard->ReadBookmark(NULL, &url_str);
// pass resulting url string through GURL to normalize
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_mac.mm ('k') | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698