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

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 7637010: Add UMA metrics for register protocol handler, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update a comment Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/tools/chromeactions.txt » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 ProtocolHandler handler = 582 ProtocolHandler handler =
583 ProtocolHandler::CreateProtocolHandler(protocol, url, title); 583 ProtocolHandler::CreateProtocolHandler(protocol, url, title);
584 584
585 ProtocolHandlerRegistry* registry = profile()->GetProtocolHandlerRegistry(); 585 ProtocolHandlerRegistry* registry = profile()->GetProtocolHandlerRegistry();
586 if (!registry->enabled() || registry->IsRegistered(handler) || 586 if (!registry->enabled() || registry->IsRegistered(handler) ||
587 registry->IsIgnored(handler)) 587 registry->IsIgnored(handler))
588 return; 588 return;
589 589
590 if (!handler.IsEmpty() && 590 if (!handler.IsEmpty() &&
591 registry->CanSchemeBeOverridden(handler.protocol())) { 591 registry->CanSchemeBeOverridden(handler.protocol())) {
592 UserMetrics::RecordAction(UserMetricsAction( 592 UserMetrics::RecordAction(
593 "RegisterProtocolHandler.InfoBar_Shown")); 593 UserMetricsAction("RegisterProtocolHandler.InfoBar_Shown"));
594 AddInfoBar(new RegisterProtocolHandlerInfoBarDelegate(tab_contents(), 594 AddInfoBar(new RegisterProtocolHandlerInfoBarDelegate(tab_contents(),
595 registry, 595 registry,
596 handler)); 596 handler));
597 } 597 }
598 } 598 }
599 599
600 void TabContentsWrapper::OnRegisterIntentHandler(const string16& action, 600 void TabContentsWrapper::OnRegisterIntentHandler(const string16& action,
601 const string16& type, 601 const string16& type,
602 const string16& href, 602 const string16& href,
603 const string16& title) { 603 const string16& title) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 if (infobars_.empty()) { 735 if (infobars_.empty()) {
736 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, 736 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
737 Source<NavigationController>(&tab_contents_->controller())); 737 Source<NavigationController>(&tab_contents_->controller()));
738 } 738 }
739 } 739 }
740 740
741 void TabContentsWrapper::RemoveAllInfoBars(bool animate) { 741 void TabContentsWrapper::RemoveAllInfoBars(bool animate) {
742 while (!infobars_.empty()) 742 while (!infobars_.empty())
743 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate); 743 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate);
744 } 744 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/tools/chromeactions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698