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

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: Clean up 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) 526 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble))
527 return true; 527 return true;
528 528
529 std::string group_name = 529 std::string group_name =
530 base::FieldTrialList::FindFullName("PasswordManagerUI"); 530 base::FieldTrialList::FindFullName("PasswordManagerUI");
531 531
532 // The bubble should be the default case that runs on the bots. 532 // The bubble should be the default case that runs on the bots.
533 return group_name != "Infobar"; 533 return group_name != "Infobar";
534 } 534 }
535 535
536 bool ChromePasswordManagerClient::IsPasswordUpdateUIEnabled() const {
537 if (!ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled()) {
538 // Currently Password update UI is implemented only for Bubble UI.
539 return false;
540 }
541 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
542 return command_line->HasSwitch(
543 password_manager::switches::kEnablePasswordChangeSupport);
544 }
545
536 bool ChromePasswordManagerClient::EnabledForSyncSignin() { 546 bool ChromePasswordManagerClient::EnabledForSyncSignin() {
537 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 547 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
538 if (command_line->HasSwitch( 548 if (command_line->HasSwitch(
539 password_manager::switches::kDisableManagerForSyncSignin)) 549 password_manager::switches::kDisableManagerForSyncSignin))
540 return false; 550 return false;
541 551
542 if (command_line->HasSwitch( 552 if (command_line->HasSwitch(
543 password_manager::switches::kEnableManagerForSyncSignin)) 553 password_manager::switches::kEnableManagerForSyncSignin))
544 return true; 554 return true;
545 555
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; 587 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS;
578 } else { 588 } else {
579 // Allow by default. 589 // Allow by default.
580 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; 590 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS;
581 } 591 }
582 } 592 }
583 593
584 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { 594 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const {
585 return web_contents()->GetVisibleURL(); 595 return web_contents()->GetVisibleURL();
586 } 596 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698