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

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

Issue 2736733006: cros: Correctly initialize autofill client for SimpleWebViewDialog. (Closed)
Patch Set: Created 3 years, 9 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 | « chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc ('k') | no next file » | 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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698