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> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #if defined(OS_CHROMEOS) | 43 #if defined(OS_CHROMEOS) |
44 #include "components/signin/core/account_id/account_id.h" | 44 #include "components/signin/core/account_id/account_id.h" |
45 #include "components/user_manager/user_manager.h" | 45 #include "components/user_manager/user_manager.h" |
46 #else | 46 #else |
47 #include "chrome/browser/signin/signin_manager_factory.h" | 47 #include "chrome/browser/signin/signin_manager_factory.h" |
48 #include "components/sync/driver/sync_error_controller.h" | 48 #include "components/sync/driver/sync_error_controller.h" |
49 #endif // defined(OS_CHROMEOS) | 49 #endif // defined(OS_CHROMEOS) |
50 | 50 |
51 using browser_sync::ProfileSyncService; | 51 using browser_sync::ProfileSyncService; |
52 | 52 |
53 typedef GoogleServiceAuthError AuthError; | 53 using AuthError = GoogleServiceAuthError; |
54 | 54 |
55 namespace sync_ui_util { | 55 namespace sync_ui_util { |
56 | 56 |
57 namespace { | 57 namespace { |
58 | 58 |
59 bool IsChromeDashboardEnabled() { | 59 bool IsChromeDashboardEnabled() { |
60 const std::string group_name = | 60 const std::string group_name = |
61 base::FieldTrialList::FindFullName("ChromeDashboard"); | 61 base::FieldTrialList::FindFullName("ChromeDashboard"); |
62 return group_name == "Enabled"; | 62 return group_name == "Enabled"; |
63 } | 63 } |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 base::string16 ConstructTime(int64_t time_in_int) { | 517 base::string16 ConstructTime(int64_t time_in_int) { |
518 base::Time time = base::Time::FromInternalValue(time_in_int); | 518 base::Time time = base::Time::FromInternalValue(time_in_int); |
519 | 519 |
520 // If time is null the format function returns a time in 1969. | 520 // If time is null the format function returns a time in 1969. |
521 if (time.is_null()) | 521 if (time.is_null()) |
522 return base::string16(); | 522 return base::string16(); |
523 return base::TimeFormatFriendlyDateAndTime(time); | 523 return base::TimeFormatFriendlyDateAndTime(time); |
524 } | 524 } |
525 | 525 |
526 } // namespace sync_ui_util | 526 } // namespace sync_ui_util |
OLD | NEW |