OLD | NEW |
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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 base::FieldTrialList::FindFullName("PasswordManagerStateForSyncSignin"); | 567 base::FieldTrialList::FindFullName("PasswordManagerStateForSyncSignin"); |
568 return group_name != "Disabled"; | 568 return group_name != "Disabled"; |
569 } | 569 } |
570 | 570 |
571 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { | 571 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { |
572 return web_contents()->GetVisibleURL(); | 572 return web_contents()->GetVisibleURL(); |
573 } | 573 } |
574 | 574 |
575 const GURL& ChromePasswordManagerClient::GetLastCommittedEntryURL() const { | 575 const GURL& ChromePasswordManagerClient::GetLastCommittedEntryURL() const { |
576 DCHECK(web_contents()); | 576 DCHECK(web_contents()); |
577 content::NavigationEntry* entry = | 577 // TODO(creis): Clean up rest of uses from |
578 web_contents()->GetController().GetLastCommittedEntry(); | 578 // https://codereview.chromium.org/1260263002. |
579 if (!entry) | 579 return web_contents()->GetController().GetLastCommittedEntry()->GetURL(); |
580 return GURL::EmptyGURL(); | |
581 | |
582 return entry->GetURL(); | |
583 } | 580 } |
584 | 581 |
585 const password_manager::CredentialsFilter* | 582 const password_manager::CredentialsFilter* |
586 ChromePasswordManagerClient::GetStoreResultFilter() const { | 583 ChromePasswordManagerClient::GetStoreResultFilter() const { |
587 return &credentials_filter_; | 584 return &credentials_filter_; |
588 } | 585 } |
OLD | NEW |