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

Side by Side Diff: components/autofill/content/renderer/password_generation_agent.cc

Issue 762723003: Prefix CommandLine usage with base namespace (Part 8: components) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/content/renderer/password_generation_agent.h" 5 #include "components/autofill/content/renderer/password_generation_agent.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "components/autofill/content/common/autofill_messages.h" 10 #include "components/autofill/content/common/autofill_messages.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 void PasswordGenerationAgent::DetermineGenerationElement() { 274 void PasswordGenerationAgent::DetermineGenerationElement() {
275 // Make sure local heuristics have identified a possible account creation 275 // Make sure local heuristics have identified a possible account creation
276 // form. 276 // form.
277 if (!possible_account_creation_form_.get() || password_elements_.empty()) { 277 if (!possible_account_creation_form_.get() || password_elements_.empty()) {
278 DVLOG(2) << "Local hueristics have not detected a possible account " 278 DVLOG(2) << "Local hueristics have not detected a possible account "
279 << "creation form"; 279 << "creation form";
280 return; 280 return;
281 } 281 }
282 282
283 if (CommandLine::ForCurrentProcess()->HasSwitch( 283 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
284 switches::kLocalHeuristicsOnlyForPasswordGeneration)) { 284 switches::kLocalHeuristicsOnlyForPasswordGeneration)) {
285 DVLOG(2) << "Bypassing additional checks."; 285 DVLOG(2) << "Bypassing additional checks.";
286 } else if (not_blacklisted_password_form_origins_.empty() || 286 } else if (not_blacklisted_password_form_origins_.empty() ||
287 !ContainsURL(not_blacklisted_password_form_origins_, 287 !ContainsURL(not_blacklisted_password_form_origins_,
288 possible_account_creation_form_->origin)) { 288 possible_account_creation_form_->origin)) {
289 DVLOG(2) << "Have not received confirmation that password form isn't " 289 DVLOG(2) << "Have not received confirmation that password form isn't "
290 << "blacklisted"; 290 << "blacklisted";
291 return; 291 return;
292 } else if (generation_enabled_forms_.empty() || 292 } else if (generation_enabled_forms_.empty() ||
293 !ContainsForm(generation_enabled_forms_, 293 !ContainsForm(generation_enabled_forms_,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 *possible_account_creation_form_)); 403 *possible_account_creation_form_));
404 404
405 editing_popup_shown_ = true; 405 editing_popup_shown_ = true;
406 } 406 }
407 407
408 void PasswordGenerationAgent::HidePopup() { 408 void PasswordGenerationAgent::HidePopup() {
409 Send(new AutofillHostMsg_HidePasswordGenerationPopup(routing_id())); 409 Send(new AutofillHostMsg_HidePasswordGenerationPopup(routing_id()));
410 } 410 }
411 411
412 } // namespace autofill 412 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698