OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 return token_info.release(); | 474 return token_info.release(); |
475 } | 475 } |
476 | 476 |
477 AboutSigninInternals::SigninStatus::SigninStatus() | 477 AboutSigninInternals::SigninStatus::SigninStatus() |
478 : timed_signin_fields(TIMED_FIELDS_COUNT) {} | 478 : timed_signin_fields(TIMED_FIELDS_COUNT) {} |
479 | 479 |
480 AboutSigninInternals::SigninStatus::~SigninStatus() { | 480 AboutSigninInternals::SigninStatus::~SigninStatus() { |
481 for (TokenInfoMap::iterator it = token_info_map.begin(); | 481 for (TokenInfoMap::iterator it = token_info_map.begin(); |
482 it != token_info_map.end(); | 482 it != token_info_map.end(); |
483 ++it) { | 483 ++it) { |
484 STLDeleteElements(&it->second); | 484 base::STLDeleteElements(&it->second); |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 AboutSigninInternals::TokenInfo* AboutSigninInternals::SigninStatus::FindToken( | 488 AboutSigninInternals::TokenInfo* AboutSigninInternals::SigninStatus::FindToken( |
489 const std::string& account_id, | 489 const std::string& account_id, |
490 const std::string& consumer_id, | 490 const std::string& consumer_id, |
491 const OAuth2TokenService::ScopeSet& scopes) { | 491 const OAuth2TokenService::ScopeSet& scopes) { |
492 for (size_t i = 0; i < token_info_map[account_id].size(); ++i) { | 492 for (size_t i = 0; i < token_info_map[account_id].size(); ++i) { |
493 TokenInfo* tmp = token_info_map[account_id][i]; | 493 TokenInfo* tmp = token_info_map[account_id][i]; |
494 if (tmp->consumer_id == consumer_id && tmp->scopes == scopes) | 494 if (tmp->consumer_id == consumer_id && tmp->scopes == scopes) |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 } | 671 } |
672 | 672 |
673 for(const std::string& account_id : accounts_in_token_service) { | 673 for(const std::string& account_id : accounts_in_token_service) { |
674 std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue()); | 674 std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue()); |
675 entry->SetString("accountId", account_id); | 675 entry->SetString("accountId", account_id); |
676 account_info->Append(std::move(entry)); | 676 account_info->Append(std::move(entry)); |
677 } | 677 } |
678 | 678 |
679 return signin_status; | 679 return signin_status; |
680 } | 680 } |
OLD | NEW |