| 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 |
| 407 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 410 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 408 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) | 411 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) |
| 409 return false; | 412 return false; |
| 410 | 413 |
| 411 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) | 414 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) |
| 412 return true; | 415 return true; |
| 413 | 416 |
| 414 std::string group_name = | 417 std::string group_name = |
| 415 base::FieldTrialList::FindFullName("PasswordManagerUI"); | 418 base::FieldTrialList::FindFullName("PasswordManagerUI"); |
| 416 | 419 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 461 |
| 459 if (group_name == "DisallowSyncCredentialsForReauth") { | 462 if (group_name == "DisallowSyncCredentialsForReauth") { |
| 460 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 463 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
| 461 } else if (group_name == "DisallowSyncCredentials") { | 464 } else if (group_name == "DisallowSyncCredentials") { |
| 462 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 465 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
| 463 } else { | 466 } else { |
| 464 // Allow by default. | 467 // Allow by default. |
| 465 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 468 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
| 466 } | 469 } |
| 467 } | 470 } |
| OLD | NEW |