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

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

Issue 1403803003: Add metrics for window.external.AddSearchProvider and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 1938
1939 bool Browser::CanSaveContents(content::WebContents* web_contents) const { 1939 bool Browser::CanSaveContents(content::WebContents* web_contents) const {
1940 return chrome::CanSavePage(this); 1940 return chrome::CanSavePage(this);
1941 } 1941 }
1942 1942
1943 /////////////////////////////////////////////////////////////////////////////// 1943 ///////////////////////////////////////////////////////////////////////////////
1944 // Browser, SearchEngineTabHelperDelegate implementation: 1944 // Browser, SearchEngineTabHelperDelegate implementation:
1945 1945
1946 void Browser::ConfirmAddSearchProvider(TemplateURL* template_url, 1946 void Browser::ConfirmAddSearchProvider(TemplateURL* template_url,
1947 Profile* profile) { 1947 Profile* profile) {
1948 content::RecordAction(
1949 UserMetricsAction("window.external.AddSearchProvider_success"));
1948 window()->ConfirmAddSearchProvider(template_url, profile); 1950 window()->ConfirmAddSearchProvider(template_url, profile);
1949 } 1951 }
1950 1952
1951 /////////////////////////////////////////////////////////////////////////////// 1953 ///////////////////////////////////////////////////////////////////////////////
1952 // Browser, SearchTabHelperDelegate implementation: 1954 // Browser, SearchTabHelperDelegate implementation:
1953 1955
1954 void Browser::NavigateOnThumbnailClick(const GURL& url, 1956 void Browser::NavigateOnThumbnailClick(const GURL& url,
1955 WindowOpenDisposition disposition, 1957 WindowOpenDisposition disposition,
1956 content::WebContents* source_contents) { 1958 content::WebContents* source_contents) {
1957 DCHECK(source_contents); 1959 DCHECK(source_contents);
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 if (contents && !allow_js_access) { 2704 if (contents && !allow_js_access) {
2703 contents->web_contents()->GetController().LoadURL( 2705 contents->web_contents()->GetController().LoadURL(
2704 target_url, 2706 target_url,
2705 content::Referrer(), 2707 content::Referrer(),
2706 ui::PAGE_TRANSITION_LINK, 2708 ui::PAGE_TRANSITION_LINK,
2707 std::string()); // No extra headers. 2709 std::string()); // No extra headers.
2708 } 2710 }
2709 2711
2710 return contents != NULL; 2712 return contents != NULL;
2711 } 2713 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/external_extension.cc » ('j') | chrome/renderer/external_extension.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698