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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
27 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 27 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
28 #include "chrome/browser/web_data_service_factory.h" | 28 #include "chrome/browser/web_data_service_factory.h" |
29 #include "chrome/common/url_constants.h" | 29 #include "chrome/common/url_constants.h" |
30 #include "components/autofill/content/browser/content_autofill_driver.h" | 30 #include "components/autofill/content/browser/content_autofill_driver.h" |
31 #include "components/autofill/content/common/autofill_messages.h" | 31 #include "components/autofill/content/common/autofill_messages.h" |
32 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" | 32 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" |
33 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" | 33 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" |
34 #include "components/autofill/core/common/autofill_pref_names.h" | 34 #include "components/autofill/core/common/autofill_pref_names.h" |
35 #include "components/password_manager/content/browser/content_password_manager_d river.h" | 35 #include "components/password_manager/content/browser/content_password_manager_d river.h" |
36 #include "components/user_prefs/user_prefs.h" | 36 #include "components/user_prefs/user_prefs.h" |
37 #include "content/public/browser/navigation_entry.h" | |
37 #include "content/public/browser/render_frame_host.h" | 38 #include "content/public/browser/render_frame_host.h" |
38 #include "ui/gfx/geometry/rect.h" | 39 #include "ui/gfx/geometry/rect.h" |
39 | 40 |
40 #if defined(OS_ANDROID) | 41 #if defined(OS_ANDROID) |
41 #include "chrome/browser/android/chromium_application.h" | 42 #include "chrome/browser/android/chromium_application.h" |
42 #include "chrome/browser/ui/android/autofill/autofill_logger_android.h" | 43 #include "chrome/browser/ui/android/autofill/autofill_logger_android.h" |
43 #else | 44 #else |
44 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 45 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
45 #include "components/ui/zoom/zoom_controller.h" | 46 #include "components/ui/zoom/zoom_controller.h" |
46 #endif | 47 #endif |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
300 web_contents()->SendToAllFrames( | 301 web_contents()->SendToAllFrames( |
301 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); | 302 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
302 } | 303 } |
303 | 304 |
304 void ChromeAutofillClient::LinkClicked(const GURL& url, | 305 void ChromeAutofillClient::LinkClicked(const GURL& url, |
305 WindowOpenDisposition disposition) { | 306 WindowOpenDisposition disposition) { |
306 web_contents()->OpenURL(content::OpenURLParams( | 307 web_contents()->OpenURL(content::OpenURLParams( |
307 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); | 308 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); |
308 } | 309 } |
309 | 310 |
311 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { | |
312 content::SSLStatus ssl_status; | |
313 content::NavigationEntry* navigation_entry = | |
314 web_contents()->GetController().GetLastCommittedEntry(); | |
315 DCHECK(navigation_entry); | |
316 if (!navigation_entry) | |
bondd
2015/07/01 22:16:50
AFAIK checking for DCHECK() failure like this is a
jww
2015/07/01 22:25:45
More specifically, this should not be a DCHECK() a
| |
317 return false; | |
318 | |
319 ssl_status = navigation_entry->GetSSL(); | |
320 return ssl_status.security_style == | |
321 content::SECURITY_STYLE_AUTHENTICATED && | |
322 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; | |
323 } | |
324 | |
310 } // namespace autofill | 325 } // namespace autofill |
OLD | NEW |