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

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

Issue 2672623005: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: fix test added in rebase 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // No need to notify non-live frames. 335 // No need to notify non-live frames.
336 // And actually they have no corresponding drivers in the factory's map. 336 // And actually they have no corresponding drivers in the factory's map.
337 if (!frame->IsRenderFrameLive()) 337 if (!frame->IsRenderFrameLive())
338 continue; 338 continue;
339 ContentAutofillDriver* driver = factory->DriverForFrame(frame); 339 ContentAutofillDriver* driver = factory->DriverForFrame(frame);
340 DCHECK(driver); 340 DCHECK(driver);
341 driver->NotifyFirstUserGestureObservedInTab(); 341 driver->NotifyFirstUserGestureObservedInTab();
342 } 342 }
343 } 343 }
344 344
345 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { 345 bool ChromeAutofillClient::IsContextSecure() {
346 content::SSLStatus ssl_status; 346 content::SSLStatus ssl_status;
347 content::NavigationEntry* navigation_entry = 347 content::NavigationEntry* navigation_entry =
348 web_contents()->GetController().GetLastCommittedEntry(); 348 web_contents()->GetController().GetLastCommittedEntry();
349 if (!navigation_entry) 349 if (!navigation_entry)
350 return false; 350 return false;
351 351
352 ssl_status = navigation_entry->GetSSL(); 352 ssl_status = navigation_entry->GetSSL();
353 // Note: If changing the implementation below, also change 353 // Note: If changing the implementation below, also change
354 // AwAutofillClient::IsContextSecure. See crbug.com/505388 354 // AwAutofillClient::IsContextSecure. See crbug.com/505388
355 return navigation_entry->GetURL().SchemeIsCryptographic() && 355 return navigation_entry->GetURL().SchemeIsCryptographic() &&
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // directly. 393 // directly.
394 const GURL kSecurityIndicatorHelpCenterUrl( 394 const GURL kSecurityIndicatorHelpCenterUrl(
395 "https://support.google.com/chrome/?p=ui_security_indicator"); 395 "https://support.google.com/chrome/?p=ui_security_indicator");
396 web_contents()->OpenURL(content::OpenURLParams( 396 web_contents()->OpenURL(content::OpenURLParams(
397 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(), 397 GURL(kSecurityIndicatorHelpCenterUrl), content::Referrer(),
398 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 398 WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK,
399 false /* is_renderer_initiated */)); 399 false /* is_renderer_initiated */));
400 } 400 }
401 401
402 } // namespace autofill 402 } // 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