| 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/ui/autofill/chrome_autofill_client.h" | 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/browser/ui/browser.h" | 71 #include "chrome/browser/ui/browser.h" |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient); | 74 DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient); |
| 75 | 75 |
| 76 namespace autofill { | 76 namespace autofill { |
| 77 | 77 |
| 78 namespace { | 78 namespace { |
| 79 | 79 |
| 80 const char kSecurityIndicatorHelpCenterUrl[] = | 80 const char kSecurityIndicatorHelpCenterUrl[] = |
| 81 "https://support.google.com/chrome/answer/95617?hl=en"; | 81 "https://support.google.com/chrome/answer/95617"; |
| 82 | 82 |
| 83 } // anonymous namespace | 83 } // anonymous namespace |
| 84 | 84 |
| 85 ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) | 85 ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) |
| 86 : content::WebContentsObserver(web_contents), | 86 : content::WebContentsObserver(web_contents), |
| 87 unmask_controller_( | 87 unmask_controller_( |
| 88 user_prefs::UserPrefs::Get(web_contents->GetBrowserContext()), | 88 user_prefs::UserPrefs::Get(web_contents->GetBrowserContext()), |
| 89 Profile::FromBrowserContext(web_contents->GetBrowserContext()) | 89 Profile::FromBrowserContext(web_contents->GetBrowserContext()) |
| 90 ->IsOffTheRecord()) { | 90 ->IsOffTheRecord()) { |
| 91 DCHECK(web_contents); | 91 DCHECK(web_contents); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 400 } |
| 401 | 401 |
| 402 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { | 402 void ChromeAutofillClient::ShowHttpNotSecureExplanation() { |
| 403 web_contents()->OpenURL(content::OpenURLParams( | 403 web_contents()->OpenURL(content::OpenURLParams( |
| 404 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), | 404 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), |
| 405 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, | 405 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, |
| 406 false /* is_renderer_initiated */)); | 406 false /* is_renderer_initiated */)); |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace autofill | 409 } // namespace autofill |
| OLD | NEW |