| 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 "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/hash.h" | 10 #include "base/hash.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 tracked_objects::ScopedTracker tracking_profile1( | 282 tracked_objects::ScopedTracker tracking_profile1( |
| 283 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 283 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 284 "422460 AboutSigninInternals::NotifyObservers1")); | 284 "422460 AboutSigninInternals::NotifyObservers1")); |
| 285 | 285 |
| 286 FOR_EACH_OBSERVER(AboutSigninInternals::Observer, | 286 FOR_EACH_OBSERVER(AboutSigninInternals::Observer, |
| 287 signin_observers_, | 287 signin_observers_, |
| 288 OnSigninStateChanged(signin_status_value.get())); | 288 OnSigninStateChanged(signin_status_value.get())); |
| 289 } | 289 } |
| 290 | 290 |
| 291 scoped_ptr<base::DictionaryValue> AboutSigninInternals::GetSigninStatus() { | 291 scoped_ptr<base::DictionaryValue> AboutSigninInternals::GetSigninStatus() { |
| 292 return signin_status_.ToValue(account_tracker_, | 292 return signin_status_.ToValue( |
| 293 signin_manager_, | 293 account_tracker_, signin_manager_, signin_error_controller_, |
| 294 signin_error_controller_, | 294 token_service_, cookie_manager_service_, client_->GetProductVersion()); |
| 295 token_service_, | |
| 296 cookie_manager_service_, | |
| 297 client_->GetProductVersion()).Pass(); | |
| 298 } | 295 } |
| 299 | 296 |
| 300 void AboutSigninInternals::OnAccessTokenRequested( | 297 void AboutSigninInternals::OnAccessTokenRequested( |
| 301 const std::string& account_id, | 298 const std::string& account_id, |
| 302 const std::string& consumer_id, | 299 const std::string& consumer_id, |
| 303 const OAuth2TokenService::ScopeSet& scopes) { | 300 const OAuth2TokenService::ScopeSet& scopes) { |
| 304 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460 is | 301 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460 is |
| 305 // fixed. | 302 // fixed. |
| 306 tracked_objects::ScopedTracker tracking_profile( | 303 tracked_objects::ScopedTracker tracking_profile( |
| 307 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 304 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 no_token_entry->SetString("accountId", "No token in Token Service."); | 665 no_token_entry->SetString("accountId", "No token in Token Service."); |
| 669 account_info->Append(no_token_entry); | 666 account_info->Append(no_token_entry); |
| 670 } | 667 } |
| 671 | 668 |
| 672 for(const std::string& account_id : accounts_in_token_service) { | 669 for(const std::string& account_id : accounts_in_token_service) { |
| 673 base::DictionaryValue* entry = new base::DictionaryValue(); | 670 base::DictionaryValue* entry = new base::DictionaryValue(); |
| 674 entry->SetString("accountId", account_id); | 671 entry->SetString("accountId", account_id); |
| 675 account_info->Append(entry); | 672 account_info->Append(entry); |
| 676 } | 673 } |
| 677 | 674 |
| 678 return signin_status.Pass(); | 675 return signin_status; |
| 679 } | 676 } |
| OLD | NEW |