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

Unified Diff: chrome/browser/clipboard/incognito_marker.h

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/clipboard/incognito_marker.h
diff --git a/chrome/browser/clipboard/incognito_marker.h b/chrome/browser/clipboard/incognito_marker.h
new file mode 100644
index 0000000000000000000000000000000000000000..92d72f8199eae9a3cfefcefa44113887d6f4acf5
--- /dev/null
+++ b/chrome/browser/clipboard/incognito_marker.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CLIPBOARD_INCOGNITO_MARKER_H_
+#define CHROME_BROWSER_CLIPBOARD_INCOGNITO_MARKER_H_
+
+#include "ui/base/clipboard/clipboard.h"
+
+class Profile;
+
+namespace chrome {
+
+// We want to add a special flag stored in OS clipboard in order to delete
+// this entry upon OffTheRecord profile destruction.
+// Stores |profile| in the |objects| if |profile| is OffTheRecord profile.
+// Otherwise, method does nothing.
+void AddIncognitoMarkerForOffTheRecordProfile(
+ ui::Clipboard::ObjectMap& objects, Profile* profile);
+
+// Reads pointer to OffTheRecordProfile from the clipboard
+// and compares it to |profile|.
+bool IsThisIncognitoMarkerInClipboard(Profile* profile);
+
+} // namespace chrome
+#endif // CHROME_BROWSER_CLIPBOARD_INCOGNITO_MARKER_H_

Powered by Google App Engine
This is Rietveld 408576698