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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 1151373006: Update Confirmation UI for saved password change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed reviewer comments Created 5 years, 6 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/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) 532 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble))
533 return true; 533 return true;
534 534
535 std::string group_name = 535 std::string group_name =
536 base::FieldTrialList::FindFullName("PasswordManagerUI"); 536 base::FieldTrialList::FindFullName("PasswordManagerUI");
537 537
538 // The bubble should be the default case that runs on the bots. 538 // The bubble should be the default case that runs on the bots.
539 return group_name != "Infobar"; 539 return group_name != "Infobar";
540 } 540 }
541 541
542 bool ChromePasswordManagerClient::IsUpdatePasswordUIEnabled() const {
543 if (!ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled()) {
544 // Currently Password update UI is implemented only for Bubble UI.
545 return false;
546 }
547 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
548 return command_line->HasSwitch(
549 password_manager::switches::kEnablePasswordChangeSupport);
550 }
551
542 bool ChromePasswordManagerClient::EnabledForSyncSignin() { 552 bool ChromePasswordManagerClient::EnabledForSyncSignin() {
543 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 553 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
544 if (command_line->HasSwitch( 554 if (command_line->HasSwitch(
545 password_manager::switches::kDisableManagerForSyncSignin)) 555 password_manager::switches::kDisableManagerForSyncSignin))
546 return false; 556 return false;
547 557
548 if (command_line->HasSwitch( 558 if (command_line->HasSwitch(
549 password_manager::switches::kEnableManagerForSyncSignin)) 559 password_manager::switches::kEnableManagerForSyncSignin))
550 return true; 560 return true;
551 561
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; 593 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS;
584 } else { 594 } else {
585 // Allow by default. 595 // Allow by default.
586 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; 596 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS;
587 } 597 }
588 } 598 }
589 599
590 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { 600 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const {
591 return web_contents()->GetVisibleURL(); 601 return web_contents()->GetVisibleURL();
592 } 602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698