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

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

Issue 2665313002: Add a counter for clicking on Form-Not-Secure warnings (Closed)
Patch Set: Record UMA metrics for clicking on "Learn More" Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/autofill/chrome_autofill_client.h" 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/metrics/histogram_macros.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "chrome/browser/autofill/personal_data_manager_factory.h" 15 #include "chrome/browser/autofill/personal_data_manager_factory.h"
15 #include "chrome/browser/autofill/risk_util.h" 16 #include "chrome/browser/autofill/risk_util.h"
16 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 18 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
18 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_manager.h" 20 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
21 #include "chrome/browser/signin/signin_manager_factory.h" 22 #include "chrome/browser/signin/signin_manager_factory.h"
22 #include "chrome/browser/signin/signin_promo_util.h" 23 #include "chrome/browser/signin/signin_promo_util.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 372
372 void ChromeAutofillClient::StartSigninFlow() { 373 void ChromeAutofillClient::StartSigninFlow() {
373 #if defined(OS_ANDROID) 374 #if defined(OS_ANDROID)
374 chrome::android::SigninPromoUtilAndroid::StartAccountSigninActivityForPromo( 375 chrome::android::SigninPromoUtilAndroid::StartAccountSigninActivityForPromo(
375 content::ContentViewCore::FromWebContents(web_contents()), 376 content::ContentViewCore::FromWebContents(web_contents()),
376 signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN); 377 signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN);
377 #endif 378 #endif
378 } 379 }
379 380
380 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { 381 void ChromeAutofillClient::ShowHttpNotSecureExplanation() {
382 UMA_HISTOGRAM_BOOLEAN("Autofill.ShowHttpNotSecureExplanation", true);
Mathieu 2017/02/01 13:45:39 consider using a user action: https://cs.chromium.
estark 2017/02/01 18:55:49 Oh I've always wondered why something like that do
381 #if !defined(OS_ANDROID) 383 #if !defined(OS_ANDROID)
382 // On desktop platforms, open Page Info, which briefly explains the HTTP 384 // On desktop platforms, open Page Info, which briefly explains the HTTP
383 // warning message and provides a link to the Help Center for more details. 385 // warning message and provides a link to the Help Center for more details.
384 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); 386 Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
385 if (browser && chrome::ShowWebsiteSettings(browser, web_contents())) 387 if (browser && chrome::ShowWebsiteSettings(browser, web_contents()))
386 return; 388 return;
387 // Otherwise fall through to the section below that opens the URL directly. 389 // Otherwise fall through to the section below that opens the URL directly.
388 #endif 390 #endif
389 391
390 // On Android, where Page Info does not (yet) contain a link to the Help 392 // On Android, where Page Info does not (yet) contain a link to the Help
391 // Center (https://crbug.com/679532), or in corner cases where Page Info is 393 // Center (https://crbug.com/679532), or in corner cases where Page Info is
392 // not shown (for example, no navigation entry), just launch the Help topic 394 // not shown (for example, no navigation entry), just launch the Help topic
393 // directly. 395 // directly.
394 const GURL kSecurityIndicatorHelpCenterUrl( 396 const GURL kSecurityIndicatorHelpCenterUrl(
395 "https://support.google.com/chrome/?p=ui_security_indicator"); 397 "https://support.google.com/chrome/?p=ui_security_indicator");
396 web_contents()->OpenURL(content::OpenURLParams( 398 web_contents()->OpenURL(content::OpenURLParams(
397 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), 399 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(),
398 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 400 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
399 false /* is_renderer_initiated */)); 401 false /* is_renderer_initiated */));
400 } 402 }
401 403
402 } // namespace autofill 404 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698