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

Unified Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 12041078: Clear the clipboard closing Incognito window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved the feature to 'content' layer 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: chrome/browser/profiles/off_the_record_profile_impl.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index af37bd22a94f95daf048e165f2358bc5636d177b..71f1bf48149fecfbe95d99d0d19de0d0c83d8a31 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -44,6 +44,7 @@
#include "chrome/common/render_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/host_zoom_map.h"
+#include "content/public/browser/incognito_marker.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
@@ -156,6 +157,9 @@ OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
// Clears any data the network stack contains that may be related to the
// OTR session.
g_browser_process->io_thread()->ChangedToOnTheRecord();
+ // Clear the clipboard if current data were written from Incognito
+ if (content::IsThisIncognitoMarkerInClipboard(this))
jam 2013/02/04 16:01:59 this should be handled inside the content layer. o
+ ui::Clipboard::GetForCurrentThread()->Clear(ui::Clipboard::BUFFER_STANDARD);
}
void OffTheRecordProfileImpl::InitHostZoomMap() {

Powered by Google App Engine
This is Rietveld 408576698