| OLD | NEW |
| 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/supervised_user/child_accounts/family_info_fetcher.h" | 5 #include "chrome/browser/supervised_user/child_accounts/family_info_fetcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const std::string& profile_url, | 65 const std::string& profile_url, |
| 66 const std::string& profile_image_url) | 66 const std::string& profile_image_url) |
| 67 : obfuscated_gaia_id(obfuscated_gaia_id), | 67 : obfuscated_gaia_id(obfuscated_gaia_id), |
| 68 role(role), | 68 role(role), |
| 69 display_name(display_name), | 69 display_name(display_name), |
| 70 email(email), | 70 email(email), |
| 71 profile_url(profile_url), | 71 profile_url(profile_url), |
| 72 profile_image_url(profile_image_url) { | 72 profile_image_url(profile_image_url) { |
| 73 } | 73 } |
| 74 | 74 |
| 75 FamilyInfoFetcher::FamilyMember::FamilyMember(const FamilyMember& other) = |
| 76 default; |
| 77 |
| 75 FamilyInfoFetcher::FamilyMember::~FamilyMember() { | 78 FamilyInfoFetcher::FamilyMember::~FamilyMember() { |
| 76 } | 79 } |
| 77 | 80 |
| 78 FamilyInfoFetcher::FamilyInfoFetcher( | 81 FamilyInfoFetcher::FamilyInfoFetcher( |
| 79 Consumer* consumer, | 82 Consumer* consumer, |
| 80 const std::string& account_id, | 83 const std::string& account_id, |
| 81 OAuth2TokenService* token_service, | 84 OAuth2TokenService* token_service, |
| 82 net::URLRequestContextGetter* request_context) | 85 net::URLRequestContextGetter* request_context) |
| 83 : OAuth2TokenService::Consumer("family_info_fetcher"), | 86 : OAuth2TokenService::Consumer("family_info_fetcher"), |
| 84 consumer_(consumer), | 87 consumer_(consumer), |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 consumer_->OnFailure(SERVICE_ERROR); | 316 consumer_->OnFailure(SERVICE_ERROR); |
| 314 return; | 317 return; |
| 315 } | 318 } |
| 316 std::vector<FamilyMember> members; | 319 std::vector<FamilyMember> members; |
| 317 if (!ParseMembers(members_list, &members)){ | 320 if (!ParseMembers(members_list, &members)){ |
| 318 consumer_->OnFailure(SERVICE_ERROR); | 321 consumer_->OnFailure(SERVICE_ERROR); |
| 319 return; | 322 return; |
| 320 } | 323 } |
| 321 consumer_->OnGetFamilyMembersSuccess(members); | 324 consumer_->OnGetFamilyMembersSuccess(members); |
| 322 } | 325 } |
| OLD | NEW |