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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 12041078: Clear the clipboard closing Incognito window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge and compilation fixes Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 84ee68b424789bf1647124836183753781ec990e..d0f06e16df216d2d65541ed92e4f43fa92a88758 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -22,7 +22,9 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
#include "content/port/browser/render_widget_host_view_port.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
@@ -873,10 +875,12 @@ void RenderWidgetHostViewAura::SelectionChanged(const string16& text,
if (text.empty() || range.is_empty())
return;
+ BrowserContext* browser_context = host_->GetProcess()->GetBrowserContext();
// Set the BUFFER_SELECTION to the ui::Clipboard.
ui::ScopedClipboardWriter clipboard_writer(
ui::Clipboard::GetForCurrentThread(),
- ui::Clipboard::BUFFER_SELECTION);
+ ui::Clipboard::BUFFER_SELECTION,
+ BrowserContext::GetMarkerForOffTheRecordContext(browser_context));
clipboard_writer.WriteText(text);
#endif // defined(USE_X11) && !defined(OS_CHROMEOS)
}

Powered by Google App Engine
This is Rietveld 408576698