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

Side by Side Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 2688053003: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: Created 3 years, 10 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
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/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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // No need to notify non-live frames. 336 // No need to notify non-live frames.
337 // And actually they have no corresponding drivers in the factory's map. 337 // And actually they have no corresponding drivers in the factory's map.
338 if (!frame->IsRenderFrameLive()) 338 if (!frame->IsRenderFrameLive())
339 continue; 339 continue;
340 ContentAutofillDriver* driver = factory->DriverForFrame(frame); 340 ContentAutofillDriver* driver = factory->DriverForFrame(frame);
341 DCHECK(driver); 341 DCHECK(driver);
342 driver->NotifyFirstUserGestureObservedInTab(); 342 driver->NotifyFirstUserGestureObservedInTab();
343 } 343 }
344 } 344 }
345 345
346 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { 346 bool ChromeAutofillClient::IsContextSecure() {
347 content::SSLStatus ssl_status; 347 content::SSLStatus ssl_status;
348 content::NavigationEntry* navigation_entry = 348 content::NavigationEntry* navigation_entry =
349 web_contents()->GetController().GetLastCommittedEntry(); 349 web_contents()->GetController().GetLastCommittedEntry();
350 if (!navigation_entry) 350 if (!navigation_entry)
351 return false; 351 return false;
352 352
353 ssl_status = navigation_entry->GetSSL(); 353 ssl_status = navigation_entry->GetSSL();
354 // Note: If changing the implementation below, also change 354 // Note: If changing the implementation below, also change
355 // AwAutofillClient::IsContextSecure. See crbug.com/505388 355 // AwAutofillClient::IsContextSecure. See crbug.com/505388
356 return navigation_entry->GetURL().SchemeIsCryptographic() && 356 return navigation_entry->GetURL().SchemeIsCryptographic() &&
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // directly. 404 // directly.
405 const GURL kSecurityIndicatorHelpCenterUrl( 405 const GURL kSecurityIndicatorHelpCenterUrl(
406 "https://support.google.com/chrome/?p=ui_security_indicator"); 406 "https://support.google.com/chrome/?p=ui_security_indicator");
407 web_contents()->OpenURL(content::OpenURLParams( 407 web_contents()->OpenURL(content::OpenURLParams(
408 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), 408 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(),
409 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 409 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
410 false /* is_renderer_initiated */)); 410 false /* is_renderer_initiated */));
411 } 411 }
412 412
413 } // namespace autofill 413 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.h ('k') | components/autofill/core/browser/autofill_assistant.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698