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

Unified Diff: ui/base/clipboard/clipboard.h

Issue 199763002: Verify FormatType in ScopedClipboardWriter::WritePickledData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux GTK Created 6 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | ui/base/clipboard/clipboard.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard.h
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index b59a73c0e03daed0edf590f9406d8f7feed3a4e1..09a4584b47ddf606ee78923202e959621623cfb2 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -83,10 +83,7 @@ class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
std::string Serialize() const;
static FormatType Deserialize(const std::string& serialization);
-#if defined(OS_WIN) || defined(USE_AURA)
- // FormatType can be used in a set on some platforms.
bool operator<(const FormatType& other) const;
-#endif
#if defined(OS_WIN)
const FORMATETC& ToFormatEtc() const { return data_; }
@@ -273,6 +270,9 @@ class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// limitiations, |format_string| must never be controlled by the user.
static FormatType GetFormatType(const std::string& format_string);
+ // Returns true if the |format| was registered with GetFormatType().
+ static bool IsRegisteredFormatType(const FormatType& format);
+
// Get format identifiers for various types.
static const FormatType& GetUrlFormatType();
static const FormatType& GetUrlWFormatType();
@@ -317,6 +317,8 @@ class UI_BASE_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
Clipboard();
~Clipboard();
+ static FormatType GetFormatTypeInternal(const std::string& format_string);
+
void DispatchObject(ObjectType type, const ObjectMapParams& params);
void WriteText(const char* text_data, size_t text_len);
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | ui/base/clipboard/clipboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698