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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 void ChromePasswordManagerClient::OnLogRouterAvailabilityChanged( | 268 void ChromePasswordManagerClient::OnLogRouterAvailabilityChanged( |
269 bool router_can_be_used) { | 269 bool router_can_be_used) { |
270 if (can_use_log_router_ == router_can_be_used) | 270 if (can_use_log_router_ == router_can_be_used) |
271 return; | 271 return; |
272 can_use_log_router_ = router_can_be_used; | 272 can_use_log_router_ = router_can_be_used; |
273 | 273 |
274 NotifyRendererOfLoggingAvailability(); | 274 NotifyRendererOfLoggingAvailability(); |
275 } | 275 } |
276 | 276 |
277 void ChromePasswordManagerClient::LogSavePasswordProgress( | 277 void ChromePasswordManagerClient::LogSavePasswordProgress( |
278 const std::string& text) { | 278 const std::string& text) const { |
279 if (!IsLoggingActive()) | 279 if (!IsLoggingActive()) |
280 return; | 280 return; |
281 PasswordManagerInternalsService* service = | 281 PasswordManagerInternalsService* service = |
282 PasswordManagerInternalsServiceFactory::GetForBrowserContext(profile_); | 282 PasswordManagerInternalsServiceFactory::GetForBrowserContext(profile_); |
283 if (service) | 283 if (service) |
284 service->ProcessLog(text); | 284 service->ProcessLog(text); |
285 } | 285 } |
286 | 286 |
287 bool ChromePasswordManagerClient::IsLoggingActive() const { | 287 bool ChromePasswordManagerClient::IsLoggingActive() const { |
288 // WebUI tabs do not need to log password saving progress. In particular, the | 288 // WebUI tabs do not need to log password saving progress. In particular, the |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 | 489 |
490 if (group_name == "DisallowSyncCredentialsForReauth") { | 490 if (group_name == "DisallowSyncCredentialsForReauth") { |
491 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 491 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
492 } else if (group_name == "DisallowSyncCredentials") { | 492 } else if (group_name == "DisallowSyncCredentials") { |
493 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 493 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
494 } else { | 494 } else { |
495 // Allow by default. | 495 // Allow by default. |
496 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 496 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
497 } | 497 } |
498 } | 498 } |
OLD | NEW |