Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 735733002: PasswordManagerClient::LogSavePasswordProgress should be const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698