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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2675133004: Add HTTP-specific metrics for password forms (Closed)
Patch Set: 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
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/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "components/password_manager/core/common/password_manager_pref_names.h" 47 #include "components/password_manager/core/common/password_manager_pref_names.h"
48 #include "components/password_manager/sync/browser/password_sync_util.h" 48 #include "components/password_manager/sync/browser/password_sync_util.h"
49 #include "components/prefs/pref_service.h" 49 #include "components/prefs/pref_service.h"
50 #include "components/sessions/content/content_record_password_state.h" 50 #include "components/sessions/content/content_record_password_state.h"
51 #include "components/signin/core/browser/signin_manager.h" 51 #include "components/signin/core/browser/signin_manager.h"
52 #include "components/version_info/version_info.h" 52 #include "components/version_info/version_info.h"
53 #include "content/public/browser/navigation_entry.h" 53 #include "content/public/browser/navigation_entry.h"
54 #include "content/public/browser/render_view_host.h" 54 #include "content/public/browser/render_view_host.h"
55 #include "content/public/browser/ssl_status.h" 55 #include "content/public/browser/ssl_status.h"
56 #include "content/public/browser/web_contents.h" 56 #include "content/public/browser/web_contents.h"
57 #include "content/public/common/origin_util.h"
57 #include "google_apis/gaia/gaia_urls.h" 58 #include "google_apis/gaia/gaia_urls.h"
58 #include "net/base/url_util.h" 59 #include "net/base/url_util.h"
59 #include "third_party/re2/src/re2/re2.h" 60 #include "third_party/re2/src/re2/re2.h"
60 61
61 #if defined(OS_ANDROID) 62 #if defined(OS_ANDROID)
62 #include "chrome/browser/android/tab_android.h" 63 #include "chrome/browser/android/tab_android.h"
63 #include "chrome/browser/password_manager/account_chooser_dialog_android.h" 64 #include "chrome/browser/password_manager/account_chooser_dialog_android.h"
64 #include "chrome/browser/password_manager/auto_signin_first_run_dialog_android.h " 65 #include "chrome/browser/password_manager/auto_signin_first_run_dialog_android.h "
65 #include "chrome/browser/password_manager/generated_password_saved_infobar_deleg ate_android.h" 66 #include "chrome/browser/password_manager/generated_password_saved_infobar_deleg ate_android.h"
66 #include "chrome/browser/password_manager/save_password_infobar_delegate_android .h" 67 #include "chrome/browser/password_manager/save_password_infobar_delegate_android .h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 557
557 void ChromePasswordManagerClient::GenerationAvailableForForm( 558 void ChromePasswordManagerClient::GenerationAvailableForForm(
558 const autofill::PasswordForm& form) { 559 const autofill::PasswordForm& form) {
559 password_manager_.GenerationAvailableForForm(form); 560 password_manager_.GenerationAvailableForForm(form);
560 } 561 }
561 562
562 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { 563 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const {
563 return web_contents()->GetVisibleURL(); 564 return web_contents()->GetVisibleURL();
564 } 565 }
565 566
567 bool ChromePasswordManagerClient::IsMainFrameSecure() const {
568 return content::IsOriginSecure(web_contents()->GetVisibleURL());
569 }
570
566 const GURL& ChromePasswordManagerClient::GetLastCommittedEntryURL() const { 571 const GURL& ChromePasswordManagerClient::GetLastCommittedEntryURL() const {
567 DCHECK(web_contents()); 572 DCHECK(web_contents());
568 content::NavigationEntry* entry = 573 content::NavigationEntry* entry =
569 web_contents()->GetController().GetLastCommittedEntry(); 574 web_contents()->GetController().GetLastCommittedEntry();
570 if (!entry) 575 if (!entry)
571 return GURL::EmptyGURL(); 576 return GURL::EmptyGURL();
572 577
573 return entry->GetURL(); 578 return entry->GetURL();
574 } 579 }
575 580
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 ChromePasswordManagerClient::FromWebContents(web_contents); 640 ChromePasswordManagerClient::FromWebContents(web_contents);
636 641
637 // Try to bind to the driver, but if driver is not available for this render 642 // Try to bind to the driver, but if driver is not available for this render
638 // frame host, the request will be just dropped. This will cause the message 643 // frame host, the request will be just dropped. This will cause the message
639 // pipe to be closed, which will raise a connection error on the peer side. 644 // pipe to be closed, which will raise a connection error on the peer side.
640 if (!instance) 645 if (!instance)
641 return; 646 return;
642 647
643 instance->credential_manager_impl_.BindRequest(std::move(request)); 648 instance->credential_manager_impl_.BindRequest(std::move(request));
644 } 649 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698