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/sync/sync_ui_util.h" | 5 #include "chrome/browser/sync/sync_ui_util.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
8 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
9 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
10 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "build/build_config.h" |
13 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "chrome/browser/signin/signin_error_controller_factory.h" | 18 #include "chrome/browser/signin/signin_error_controller_factory.h" |
16 #include "chrome/browser/signin/signin_ui_util.h" | 19 #include "chrome/browser/signin/signin_ui_util.h" |
17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
18 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_window.h" | 22 #include "chrome/browser/ui/browser_window.h" |
20 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 23 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
21 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 24 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
22 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 388 } |
386 #endif | 389 #endif |
387 | 390 |
388 MessageType GetStatus(Profile* profile, | 391 MessageType GetStatus(Profile* profile, |
389 ProfileSyncService* service, | 392 ProfileSyncService* service, |
390 const SigninManagerBase& signin) { | 393 const SigninManagerBase& signin) { |
391 return sync_ui_util::GetStatusInfo(profile, service, signin, WITH_HTML, | 394 return sync_ui_util::GetStatusInfo(profile, service, signin, WITH_HTML, |
392 nullptr, nullptr); | 395 nullptr, nullptr); |
393 } | 396 } |
394 | 397 |
395 base::string16 ConstructTime(int64 time_in_int) { | 398 base::string16 ConstructTime(int64_t time_in_int) { |
396 base::Time time = base::Time::FromInternalValue(time_in_int); | 399 base::Time time = base::Time::FromInternalValue(time_in_int); |
397 | 400 |
398 // If time is null the format function returns a time in 1969. | 401 // If time is null the format function returns a time in 1969. |
399 if (time.is_null()) | 402 if (time.is_null()) |
400 return base::string16(); | 403 return base::string16(); |
401 return base::TimeFormatFriendlyDateAndTime(time); | 404 return base::TimeFormatFriendlyDateAndTime(time); |
402 } | 405 } |
403 | 406 |
404 } // namespace sync_ui_util | 407 } // namespace sync_ui_util |
OLD | NEW |