| 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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/profiles/profile_info_cache.h" | 11 #include "chrome/browser/profiles/profile_info_cache.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/browser/signin/signin_manager_factory.h" | 13 #include "chrome/browser/signin/signin_manager_factory.h" |
| 14 #include "chrome/browser/sync/profile_sync_service.h" | 14 #include "chrome/browser/sync/profile_sync_service.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "chrome/common/profile_management_switches.h" | 16 #include "components/signin/core/common/profile_management_switches.h" |
| 17 #include "content/public/browser/notification_details.h" | 17 #include "content/public/browser/notification_details.h" |
| 18 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 19 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Update the user's GAIA info every 24 hours. | 23 // Update the user's GAIA info every 24 hours. |
| 24 const int kUpdateIntervalHours = 24; | 24 const int kUpdateIntervalHours = 24; |
| 25 | 25 |
| 26 // If the users's GAIA info is very out of date then wait at least this long | 26 // If the users's GAIA info is very out of date then wait at least this long |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 void GAIAInfoUpdateService::GoogleSigninSucceeded( | 209 void GAIAInfoUpdateService::GoogleSigninSucceeded( |
| 210 const std::string& username, | 210 const std::string& username, |
| 211 const std::string& password) { | 211 const std::string& password) { |
| 212 OnUsernameChanged(username); | 212 OnUsernameChanged(username); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void GAIAInfoUpdateService::GoogleSignedOut(const std::string& username) { | 215 void GAIAInfoUpdateService::GoogleSignedOut(const std::string& username) { |
| 216 OnUsernameChanged(std::string()); | 216 OnUsernameChanged(std::string()); |
| 217 } | 217 } |
| OLD | NEW |