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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // website. | 422 // website. |
423 param_value.clear(); | 423 param_value.clear(); |
424 if (!net::GetValueForKeyInQuery(url, "continue", ¶m_value)) | 424 if (!net::GetValueForKeyInQuery(url, "continue", ¶m_value)) |
425 return false; | 425 return false; |
426 | 426 |
427 return GURL(param_value).host() == | 427 return GURL(param_value).host() == |
428 GURL(chrome::kPasswordManagerAccountDashboardURL).host(); | 428 GURL(chrome::kPasswordManagerAccountDashboardURL).host(); |
429 } | 429 } |
430 | 430 |
431 bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { | 431 bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { |
432 #if !defined(USE_AURA) | |
433 return false; | |
434 #endif | |
435 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 432 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
436 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) | 433 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) |
437 return false; | 434 return false; |
438 | 435 |
439 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) | 436 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) |
440 return true; | 437 return true; |
441 | 438 |
442 std::string group_name = | 439 std::string group_name = |
443 base::FieldTrialList::FindFullName("PasswordManagerUI"); | 440 base::FieldTrialList::FindFullName("PasswordManagerUI"); |
444 | 441 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 483 |
487 if (group_name == "DisallowSyncCredentialsForReauth") { | 484 if (group_name == "DisallowSyncCredentialsForReauth") { |
488 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 485 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
489 } else if (group_name == "DisallowSyncCredentials") { | 486 } else if (group_name == "DisallowSyncCredentials") { |
490 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 487 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
491 } else { | 488 } else { |
492 // Allow by default. | 489 // Allow by default. |
493 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 490 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
494 } | 491 } |
495 } | 492 } |
OLD | NEW |