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

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

Issue 12313009: Add UMA statistics to the clipboard (Closed) Base URL: http://git.chromium.org/chromium/src.git@bug-177140-fix-test
Patch Set: 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: ui/base/clipboard/clipboard.h
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index ae7216528f4d8ef818e8888a9d79d141023b4aeb..1d6ba09ee8c834f421a331f8f4360789231e88ab 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -173,6 +173,8 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
// WriteObject() caller can use the SourceTag that will be stored in the
// clipboard. NULL value means "no tag".
typedef void* SourceTag;
+ // kInvalidSourceTag is not NULL but a special value != any pointer
battre 2013/02/20 23:01:03 Nit: End comments with .
vasilii 2013/02/21 10:36:01 Done.
+ static const SourceTag kInvalidSourceTag;
static ObjectMapParam SourceTag2Binary(SourceTag tag);
static SourceTag Binary2SourceTag(const std::string& serialization);
@@ -355,6 +357,17 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
size_t data_len);
void WriteSourceTag(SourceTag tag);
+
+ enum TrackedActions {
battre 2013/02/20 23:01:03 I would rename this to TrackedAction.
vasilii 2013/02/21 10:36:01 Done.
+ WRITE_CLIPBOARD_NO_SOURCE_TAG,
+ WRITE_CLIPBOARD_SOURCE_TAG,
+ READ_TEXT,
+ READ_ASCII_TEXT,
+ READ_RTF,
battre 2013/02/20 23:01:03 Is there a reason to distinguish between these 3 r
vasilii 2013/02/21 10:36:01 I think that more information is better.
+ MAX_TRACKED_ACTION,
+ };
+
+ void ReportAction(Buffer buffer, TrackedActions action) const;
#if defined(OS_WIN)
void WriteBitmapFromHandle(HBITMAP source_hbitmap,
const gfx::Size& size);

Powered by Google App Engine
This is Rietveld 408576698