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

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: Remove unnecessary READ_* values 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
« no previous file with comments | « content/browser/browser_context.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 ae7216528f4d8ef818e8888a9d79d141023b4aeb..1f5cf201ed12b2d4487d4a773a5fa236bf61720d 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.
+ static const SourceTag kInvalidSourceTag;
static ObjectMapParam SourceTag2Binary(SourceTag tag);
static SourceTag Binary2SourceTag(const std::string& serialization);
@@ -355,6 +357,15 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) {
size_t data_len);
void WriteSourceTag(SourceTag tag);
+
+ enum TrackedAction {
+ WRITE_CLIPBOARD_NO_SOURCE_TAG,
+ WRITE_CLIPBOARD_SOURCE_TAG,
+ READ_TEXT,
+ MAX_TRACKED_ACTION,
+ };
+
+ void ReportAction(Buffer buffer, TrackedAction action) const;
#if defined(OS_WIN)
void WriteBitmapFromHandle(HBITMAP source_hbitmap,
const gfx::Size& size);
« no previous file with comments | « content/browser/browser_context.cc ('k') | ui/base/clipboard/clipboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698