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

Side by Side Diff: components/signin/core/browser/about_signin_internals.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 months 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/signin/core/browser/about_signin_internals.h" 5 #include "components/signin/core/browser/about_signin_internals.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 const OAuth2TokenService::ScopeSet& scopes) { 336 const OAuth2TokenService::ScopeSet& scopes) {
337 for (size_t i = 0; i < signin_status_.token_info_map[account_id].size(); 337 for (size_t i = 0; i < signin_status_.token_info_map[account_id].size();
338 ++i) { 338 ++i) {
339 TokenInfo* token = signin_status_.token_info_map[account_id][i]; 339 TokenInfo* token = signin_status_.token_info_map[account_id][i];
340 if (token->scopes == scopes) 340 if (token->scopes == scopes)
341 token->Invalidate(); 341 token->Invalidate();
342 } 342 }
343 NotifyObservers(); 343 NotifyObservers();
344 } 344 }
345 345
346 void AboutSigninInternals::OnRefreshTokenReceived(std::string status) { 346 void AboutSigninInternals::OnRefreshTokenReceived(const std::string& status) {
347 NotifySigninValueChanged(REFRESH_TOKEN_RECEIVED, status); 347 NotifySigninValueChanged(REFRESH_TOKEN_RECEIVED, status);
348 } 348 }
349 349
350 void AboutSigninInternals::OnAuthenticationResultReceived(std::string status) { 350 void AboutSigninInternals::OnAuthenticationResultReceived(
351 const std::string& status) {
351 NotifySigninValueChanged(AUTHENTICATION_RESULT_RECEIVED, status); 352 NotifySigninValueChanged(AUTHENTICATION_RESULT_RECEIVED, status);
352 } 353 }
353 354
354 void AboutSigninInternals::OnErrorChanged() { 355 void AboutSigninInternals::OnErrorChanged() {
355 NotifyObservers(); 356 NotifyObservers();
356 } 357 }
357 358
358 void AboutSigninInternals::GoogleSigninFailed( 359 void AboutSigninInternals::GoogleSigninFailed(
359 const GoogleServiceAuthError& error) { 360 const GoogleServiceAuthError& error) {
360 NotifyObservers(); 361 NotifyObservers();
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 631 }
631 632
632 for(const std::string& account_id : accounts_in_token_service) { 633 for(const std::string& account_id : accounts_in_token_service) {
633 base::DictionaryValue* entry = new base::DictionaryValue(); 634 base::DictionaryValue* entry = new base::DictionaryValue();
634 entry->SetString("accountId", account_id); 635 entry->SetString("accountId", account_id);
635 account_info->Append(entry); 636 account_info->Append(entry);
636 } 637 }
637 638
638 return signin_status.Pass(); 639 return signin_status.Pass();
639 } 640 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698