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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 } | 223 } |
224 | 224 |
225 void AboutSigninInternals::NotifyObservers() { | 225 void AboutSigninInternals::NotifyObservers() { |
226 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. | 226 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. |
227 tracked_objects::ScopedTracker tracking_profile( | 227 tracked_objects::ScopedTracker tracking_profile( |
228 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 228 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
229 "422460 AboutSigninInternals::NotifyObservers")); | 229 "422460 AboutSigninInternals::NotifyObservers")); |
230 | 230 |
231 scoped_ptr<base::DictionaryValue> signin_status_value = | 231 scoped_ptr<base::DictionaryValue> signin_status_value = |
232 signin_status_.ToValue(client_->GetProductVersion()); | 232 signin_status_.ToValue(client_->GetProductVersion()); |
| 233 |
| 234 tracked_objects::ScopedTracker tracking_profile1( |
| 235 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 236 "422460 AboutSigninInternals::NotifyObservers1")); |
| 237 |
233 FOR_EACH_OBSERVER(AboutSigninInternals::Observer, | 238 FOR_EACH_OBSERVER(AboutSigninInternals::Observer, |
234 signin_observers_, | 239 signin_observers_, |
235 OnSigninStateChanged(signin_status_value.get())); | 240 OnSigninStateChanged(signin_status_value.get())); |
236 } | 241 } |
237 | 242 |
238 scoped_ptr<base::DictionaryValue> AboutSigninInternals::GetSigninStatus() { | 243 scoped_ptr<base::DictionaryValue> AboutSigninInternals::GetSigninStatus() { |
239 return signin_status_.ToValue(client_->GetProductVersion()).Pass(); | 244 return signin_status_.ToValue(client_->GetProductVersion()).Pass(); |
240 } | 245 } |
241 | 246 |
242 void AboutSigninInternals::OnAccessTokenRequested( | 247 void AboutSigninInternals::OnAccessTokenRequested( |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 std::sort(it->second.begin(), it->second.end(), TokenInfo::LessThan); | 503 std::sort(it->second.begin(), it->second.end(), TokenInfo::LessThan); |
499 const std::vector<TokenInfo*>& tokens = it->second; | 504 const std::vector<TokenInfo*>& tokens = it->second; |
500 for (size_t i = 0; i < tokens.size(); ++i) { | 505 for (size_t i = 0; i < tokens.size(); ++i) { |
501 base::DictionaryValue* token_info = tokens[i]->ToValue(); | 506 base::DictionaryValue* token_info = tokens[i]->ToValue(); |
502 token_details->Append(token_info); | 507 token_details->Append(token_info); |
503 } | 508 } |
504 } | 509 } |
505 | 510 |
506 return signin_status.Pass(); | 511 return signin_status.Pass(); |
507 } | 512 } |
OLD | NEW |