Index: content/browser/browser_context.cc |
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc |
index 0117fa6853d50b59db87d42076c29b8b742e6f6f..78a098b36b8b8bb2a1bbdb48dec3bff21b2fb04f 100644 |
--- a/content/browser/browser_context.cc |
+++ b/content/browser/browser_context.cc |
@@ -114,8 +114,16 @@ class OffTheRecordClipboardDestroyer : public base::SupportsUserData::Data { |
void ExamineClipboard(ui::Clipboard* clipboard, |
ui::Clipboard::Buffer buffer) { |
ui::Clipboard::SourceTag source_tag = clipboard->ReadSourceTag(buffer); |
- if (source_tag == ui::Clipboard::SourceTag(this)) |
- clipboard->Clear(buffer); |
+ if (source_tag == ui::Clipboard::SourceTag(this)) { |
+ if (buffer == ui::Clipboard::BUFFER_STANDARD) |
sky
2013/02/20 18:26:02
use {} around these.
vasilii
2013/02/21 10:36:01
Done.
|
+ // We want to leave invalid SourceTag in the clipboard in order to |
+ // collect statistic later. |
sky
2013/02/20 18:26:02
statistic -> statistics
vasilii
2013/02/21 10:36:01
Done.
|
+ clipboard->WriteObjects(buffer, |
+ ui::Clipboard::ObjectMap(), |
+ ui::Clipboard::kInvalidSourceTag); |
+ else |
+ clipboard->Clear(buffer); |
+ } |
} |
}; |