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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 return false; | 485 return false; |
486 | 486 |
487 // Check the "continue" param to see if this reauth page is for the passwords | 487 // Check the "continue" param to see if this reauth page is for the passwords |
488 // website. | 488 // website. |
489 param_value.clear(); | 489 param_value.clear(); |
490 if (!net::GetValueForKeyInQuery(url, "continue", ¶m_value)) | 490 if (!net::GetValueForKeyInQuery(url, "continue", ¶m_value)) |
491 return false; | 491 return false; |
492 | 492 |
493 // All password sites, including test sites, have autofilling disabled. | 493 // All password sites, including test sites, have autofilling disabled. |
494 CR_DEFINE_STATIC_LOCAL(RE2, account_dashboard_pattern, | 494 CR_DEFINE_STATIC_LOCAL(RE2, account_dashboard_pattern, |
495 ("passwords(-([a-z]+\\.corp))?\\.google\\.com")); | 495 ("passwords(-([a-z-]+\\.corp))?\\.google\\.com")); |
496 | 496 |
497 return RE2::FullMatch(GURL(param_value).host(), account_dashboard_pattern); | 497 return RE2::FullMatch(GURL(param_value).host(), account_dashboard_pattern); |
498 } | 498 } |
499 | 499 |
500 bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { | 500 bool ChromePasswordManagerClient::IsTheHotNewBubbleUIEnabled() { |
501 #if !defined(USE_AURA) && !defined(OS_MACOSX) | 501 #if !defined(USE_AURA) && !defined(OS_MACOSX) |
502 return false; | 502 return false; |
503 #endif | 503 #endif |
504 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 504 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
505 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) | 505 if (command_line->HasSwitch(switches::kDisableSavePasswordBubble)) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 if (group_name == "DisallowSyncCredentialsForReauth") { | 556 if (group_name == "DisallowSyncCredentialsForReauth") { |
557 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 557 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
558 } else if (group_name == "DisallowSyncCredentials") { | 558 } else if (group_name == "DisallowSyncCredentials") { |
559 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 559 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
560 } else { | 560 } else { |
561 // Allow by default. | 561 // Allow by default. |
562 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 562 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
563 } | 563 } |
564 } | 564 } |
OLD | NEW |