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 |
11 #include "base/i18n/number_formatting.h" | 11 #include "base/i18n/number_formatting.h" |
12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
18 #include "chrome/browser/signin/signin_error_controller_factory.h" | 18 #include "chrome/browser/signin/signin_error_controller_factory.h" |
19 #include "chrome/browser/signin/signin_ui_util.h" | 19 #include "chrome/browser/signin/signin_ui_util.h" |
20 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
21 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
22 #include "chrome/browser/ui/browser_window.h" | 22 #include "chrome/browser/ui/browser_window.h" |
23 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | 23 #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
24 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" | 24 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
27 #include "chrome/grit/chromium_strings.h" | 27 #include "chrome/grit/chromium_strings.h" |
28 #include "chrome/grit/generated_resources.h" | 28 #include "chrome/grit/generated_resources.h" |
29 #include "chrome/grit/locale_settings.h" | |
30 #include "components/browser_sync/profile_sync_service.h" | 29 #include "components/browser_sync/profile_sync_service.h" |
31 #include "components/prefs/pref_service.h" | 30 #include "components/prefs/pref_service.h" |
32 #include "components/signin/core/browser/signin_error_controller.h" | 31 #include "components/signin/core/browser/signin_error_controller.h" |
33 #include "components/signin/core/browser/signin_manager_base.h" | 32 #include "components/signin/core/browser/signin_manager_base.h" |
34 #include "components/strings/grit/components_strings.h" | 33 #include "components/strings/grit/components_strings.h" |
35 #include "components/sync/base/model_type.h" | 34 #include "components/sync/base/model_type.h" |
36 #include "components/sync/base/sync_prefs.h" | 35 #include "components/sync/base/sync_prefs.h" |
37 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" | 36 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" |
38 #include "components/sync/protocol/proto_enum_conversions.h" | 37 #include "components/sync/protocol/proto_enum_conversions.h" |
39 #include "components/sync/protocol/sync_protocol_error.h" | 38 #include "components/sync/protocol/sync_protocol_error.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 base::string16 ConstructTime(int64_t time_in_int) { | 487 base::string16 ConstructTime(int64_t time_in_int) { |
489 base::Time time = base::Time::FromInternalValue(time_in_int); | 488 base::Time time = base::Time::FromInternalValue(time_in_int); |
490 | 489 |
491 // If time is null the format function returns a time in 1969. | 490 // If time is null the format function returns a time in 1969. |
492 if (time.is_null()) | 491 if (time.is_null()) |
493 return base::string16(); | 492 return base::string16(); |
494 return base::TimeFormatFriendlyDateAndTime(time); | 493 return base::TimeFormatFriendlyDateAndTime(time); |
495 } | 494 } |
496 | 495 |
497 } // namespace sync_ui_util | 496 } // namespace sync_ui_util |
OLD | NEW |