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) && !defined(OS_MACOSX) |
| 433 return false; |
| 434 #endif |
432 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 435 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
433 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) | 436 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) |
434 return false; | 437 return false; |
435 | 438 |
436 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) | 439 if (command_line->HasSwitch(switches::kEnableSavePasswordBubble)) |
437 return true; | 440 return true; |
438 | 441 |
439 std::string group_name = | 442 std::string group_name = |
440 base::FieldTrialList::FindFullName("PasswordManagerUI"); | 443 base::FieldTrialList::FindFullName("PasswordManagerUI"); |
441 | 444 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 | 486 |
484 if (group_name == "DisallowSyncCredentialsForReauth") { | 487 if (group_name == "DisallowSyncCredentialsForReauth") { |
485 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 488 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
486 } else if (group_name == "DisallowSyncCredentials") { | 489 } else if (group_name == "DisallowSyncCredentials") { |
487 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 490 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
488 } else { | 491 } else { |
489 // Allow by default. | 492 // Allow by default. |
490 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 493 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
491 } | 494 } |
492 } | 495 } |
OLD | NEW |