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

Unified Diff: Source/core/html/PasswordInputType.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/PasswordInputType.cpp
diff --git a/Source/core/html/PasswordInputType.cpp b/Source/core/html/PasswordInputType.cpp
index 94518ed79a538d91ae10dba2ce04638a72a6c72f..08cc5ba88b77a4a906762251553149410c48dd7c 100644
--- a/Source/core/html/PasswordInputType.cpp
+++ b/Source/core/html/PasswordInputType.cpp
@@ -55,9 +55,9 @@ HTMLElement* PasswordInputType::passwordGeneratorButtonElement() const
bool PasswordInputType::isPasswordGenerationEnabled() const
{
- Document* document = element()->document();
- ChromeClient* chromeClient = document->page() ? document->page()->chrome().client() : 0;
- return chromeClient && chromeClient->isPasswordGenerationEnabled();
+ if (Page* page = element()->document()->page())
+ return page->chrome().client().isPasswordGenerationEnabled();
+ return false;
}
bool PasswordInputType::needsContainer() const
« no previous file with comments | « Source/core/html/HTMLFormControlElementWithState.cpp ('k') | Source/core/html/shadow/PasswordGeneratorButtonElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698