OLD | NEW |
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 return false; | 397 return false; |
398 | 398 |
399 // "rart" is the transactional reauth paramter. | 399 // "rart" is the transactional reauth paramter. |
400 std::string ignored_value; | 400 std::string ignored_value; |
401 return net::GetValueForKeyInQuery(entry->GetURL(), | 401 return net::GetValueForKeyInQuery(entry->GetURL(), |
402 "rart", | 402 "rart", |
403 &ignored_value); | 403 &ignored_value); |
404 } | 404 } |
405 | 405 |
406 bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { | 406 bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { |
407 #if !defined(USE_AURA) | |
408 return false; | |
409 #endif | |
410 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 407 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
411 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) | 408 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) |
412 return false; | 409 return false; |
413 | 410 |
414 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) | 411 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) |
415 return true; | 412 return true; |
416 | 413 |
417 std::string group_name = | 414 std::string group_name = |
418 base::FieldTrialList::FindFullName("PasswordManagerUI"); | 415 base::FieldTrialList::FindFullName("PasswordManagerUI"); |
419 | 416 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 458 |
462 if (group_name == "DisallowSyncCredentialsForReauth") { | 459 if (group_name == "DisallowSyncCredentialsForReauth") { |
463 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 460 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
464 } else if (group_name == "DisallowSyncCredentials") { | 461 } else if (group_name == "DisallowSyncCredentials") { |
465 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 462 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
466 } else { | 463 } else { |
467 // Allow by default. | 464 // Allow by default. |
468 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 465 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
469 } | 466 } |
470 } | 467 } |
OLD | NEW |