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

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: Merge with master Created 7 years, 11 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..dbc3d115b2b987cf228ab51f6b11a5100ea47437 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -17,6 +17,7 @@
#include "build/build_config.h"
#include "chrome/browser/background/background_contents_service_factory.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/clipboard/incognito_marker.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/download/chrome_download_manager_delegate.h"
#include "chrome/browser/download/download_service.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 (chrome::IsThisIncognitoMarkerInClipboard(this))
+ ui::Clipboard::GetForCurrentThread()->Clear(ui::Clipboard::BUFFER_STANDARD);
}
void OffTheRecordProfileImpl::InitHostZoomMap() {

Powered by Google App Engine
This is Rietveld 408576698