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

Side by Side Diff: ui/base/clipboard/clipboard_chromeos.cc

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, 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 unified diff | Download patch
« no previous file with comments | « ui/base/clipboard/clipboard_aurax11.cc ('k') | ui/base/clipboard/clipboard_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/clipboard/clipboard.h" 5 #include "ui/base/clipboard/clipboard.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 AuraClipboard* clipboard = GetClipboard(); 537 AuraClipboard* clipboard = GetClipboard();
538 if (clipboard->IsFormatAvailable(CUSTOM) && clipboard->GetData()) { 538 if (clipboard->IsFormatAvailable(CUSTOM) && clipboard->GetData()) {
539 ui::ReadCustomDataTypes(clipboard->GetData()->custom_data_data().c_str(), 539 ui::ReadCustomDataTypes(clipboard->GetData()->custom_data_data().c_str(),
540 clipboard->GetData()->custom_data_data().size(), types); 540 clipboard->GetData()->custom_data_data().size(), types);
541 } 541 }
542 } 542 }
543 543
544 void Clipboard::ReadText(Buffer buffer, string16* result) const { 544 void Clipboard::ReadText(Buffer buffer, string16* result) const {
545 DCHECK(CalledOnValidThread()); 545 DCHECK(CalledOnValidThread());
546 ReportAction(buffer, READ_TEXT);
546 GetClipboard()->ReadText(result); 547 GetClipboard()->ReadText(result);
547 } 548 }
548 549
549 void Clipboard::ReadAsciiText(Buffer buffer, std::string* result) const { 550 void Clipboard::ReadAsciiText(Buffer buffer, std::string* result) const {
550 DCHECK(CalledOnValidThread()); 551 DCHECK(CalledOnValidThread());
552 ReportAction(buffer, READ_TEXT);
551 GetClipboard()->ReadAsciiText(result); 553 GetClipboard()->ReadAsciiText(result);
552 } 554 }
553 555
554 void Clipboard::ReadHTML(Buffer buffer, 556 void Clipboard::ReadHTML(Buffer buffer,
555 string16* markup, 557 string16* markup,
556 std::string* src_url, 558 std::string* src_url,
557 uint32* fragment_start, 559 uint32* fragment_start,
558 uint32* fragment_end) const { 560 uint32* fragment_end) const {
559 DCHECK(CalledOnValidThread()); 561 DCHECK(CalledOnValidThread());
560 GetClipboard()->ReadHTML(markup, src_url, fragment_start, fragment_end); 562 GetClipboard()->ReadHTML(markup, src_url, fragment_start, fragment_end);
561 } 563 }
562 564
563 void Clipboard::ReadRTF(Buffer buffer, std::string* result) const { 565 void Clipboard::ReadRTF(Buffer buffer, std::string* result) const {
564 DCHECK(CalledOnValidThread()); 566 DCHECK(CalledOnValidThread());
567 ReportAction(buffer, READ_TEXT);
565 GetClipboard()->ReadRTF(result); 568 GetClipboard()->ReadRTF(result);
566 } 569 }
567 570
568 SkBitmap Clipboard::ReadImage(Buffer buffer) const { 571 SkBitmap Clipboard::ReadImage(Buffer buffer) const {
569 DCHECK(CalledOnValidThread()); 572 DCHECK(CalledOnValidThread());
570 return GetClipboard()->ReadImage(); 573 return GetClipboard()->ReadImage();
571 } 574 }
572 575
573 void Clipboard::ReadCustomData(Buffer buffer, 576 void Clipboard::ReadCustomData(Buffer buffer,
574 const string16& type, 577 const string16& type,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 return type; 711 return type;
709 } 712 }
710 713
711 // static 714 // static
712 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() { 715 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
713 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData)); 716 CR_DEFINE_STATIC_LOCAL(FormatType, type, (kMimeTypePepperCustomData));
714 return type; 717 return type;
715 } 718 }
716 719
717 } // namespace ui 720 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_aurax11.cc ('k') | ui/base/clipboard/clipboard_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698