| 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 <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 password_bubble_experiment::ShouldShowAutoSignInPromptFirstRunExperience( | 132 password_bubble_experiment::ShouldShowAutoSignInPromptFirstRunExperience( |
| 133 profile->GetPrefs())); | 133 profile->GetPrefs())); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace | 136 } // namespace |
| 137 | 137 |
| 138 // static | 138 // static |
| 139 void ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( | 139 void ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient( |
| 140 content::WebContents* contents, | 140 content::WebContents* contents, |
| 141 autofill::AutofillClient* autofill_client) { | 141 autofill::AutofillClient* autofill_client) { |
| 142 DCHECK(autofill_client); |
| 142 if (FromWebContents(contents)) | 143 if (FromWebContents(contents)) |
| 143 return; | 144 return; |
| 144 | 145 |
| 145 contents->SetUserData( | 146 contents->SetUserData( |
| 146 UserDataKey(), | 147 UserDataKey(), |
| 147 new ChromePasswordManagerClient(contents, autofill_client)); | 148 new ChromePasswordManagerClient(contents, autofill_client)); |
| 148 } | 149 } |
| 149 | 150 |
| 150 ChromePasswordManagerClient::ChromePasswordManagerClient( | 151 ChromePasswordManagerClient::ChromePasswordManagerClient( |
| 151 content::WebContents* web_contents, | 152 content::WebContents* web_contents, |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 // static | 671 // static |
| 671 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { | 672 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { |
| 672 std::string scheme = url.scheme(); | 673 std::string scheme = url.scheme(); |
| 673 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( | 674 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( |
| 674 scheme) && | 675 scheme) && |
| 675 #if BUILDFLAG(ENABLE_EXTENSIONS) | 676 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 676 scheme != extensions::kExtensionScheme && | 677 scheme != extensions::kExtensionScheme && |
| 677 #endif | 678 #endif |
| 678 scheme != content::kChromeDevToolsScheme); | 679 scheme != content::kChromeDevToolsScheme); |
| 679 } | 680 } |
| OLD | NEW |