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 "chrome/browser/profiles/gaia_info_update_service.h" | 5 #include "chrome/browser/profiles/gaia_info_update_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return; | 63 return; |
64 profile_image_downloader_.reset(new ProfileDownloader(this)); | 64 profile_image_downloader_.reset(new ProfileDownloader(this)); |
65 profile_image_downloader_->Start(); | 65 profile_image_downloader_->Start(); |
66 } | 66 } |
67 | 67 |
68 // static | 68 // static |
69 bool GAIAInfoUpdateService::ShouldUseGAIAProfileInfo(Profile* profile) { | 69 bool GAIAInfoUpdateService::ShouldUseGAIAProfileInfo(Profile* profile) { |
70 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
71 return false; | 71 return false; |
72 #endif | 72 #endif |
73 | 73 return true; |
74 // To enable this feature for testing pass "--google-profile-info". | |
75 if (switches::IsGoogleProfileInfo()) | |
76 return true; | |
77 | |
78 // This feature is disable by default. | |
79 return false; | |
80 } | 74 } |
81 | 75 |
82 bool GAIAInfoUpdateService::NeedsProfilePicture() const { | 76 bool GAIAInfoUpdateService::NeedsProfilePicture() const { |
83 return true; | 77 return true; |
84 } | 78 } |
85 | 79 |
86 int GAIAInfoUpdateService::GetDesiredImageSideLength() const { | 80 int GAIAInfoUpdateService::GetDesiredImageSideLength() const { |
87 return 256; | 81 return 256; |
88 } | 82 } |
89 | 83 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 const std::string& account_id, | 210 const std::string& account_id, |
217 const std::string& username, | 211 const std::string& username, |
218 const std::string& password) { | 212 const std::string& password) { |
219 OnUsernameChanged(username); | 213 OnUsernameChanged(username); |
220 } | 214 } |
221 | 215 |
222 void GAIAInfoUpdateService::GoogleSignedOut(const std::string& account_id, | 216 void GAIAInfoUpdateService::GoogleSignedOut(const std::string& account_id, |
223 const std::string& username) { | 217 const std::string& username) { |
224 OnUsernameChanged(std::string()); | 218 OnUsernameChanged(std::string()); |
225 } | 219 } |
OLD | NEW |