Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/sync/sync_ui_util.cc

Issue 1155443009: [Sync] Rename SyncActive to IsSyncActive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More non-android cases. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // User is signed in, but sync is disabled. 74 // User is signed in, but sync is disabled.
75 return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_DISABLED, 75 return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_DISABLED,
76 user_name); 76 user_name);
77 } else if (service->IsStartSuppressed()) { 77 } else if (service->IsStartSuppressed()) {
78 // User is signed in, but sync has been stopped. 78 // User is signed in, but sync has been stopped.
79 return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_SUPPRESSED, 79 return l10n_util::GetStringFUTF16(IDS_SIGNED_IN_WITH_SYNC_SUPPRESSED,
80 user_name); 80 user_name);
81 } 81 }
82 } 82 }
83 83
84 if (!service || !service->SyncActive()) { 84 if (!service || !service->IsSyncActive()) {
85 // User is not signed in, or sync is still initializing. 85 // User is not signed in, or sync is still initializing.
86 return base::string16(); 86 return base::string16();
87 } 87 }
88 88
89 DCHECK(!user_name.empty()); 89 DCHECK(!user_name.empty());
90 90
91 // Message may also carry additional advice with an HTML link, if acceptable. 91 // Message may also carry additional advice with an HTML link, if acceptable.
92 switch (style) { 92 switch (style) {
93 case PLAIN_TEXT: 93 case PLAIN_TEXT:
94 return l10n_util::GetStringFUTF16( 94 return l10n_util::GetStringFUTF16(
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 base::string16 ConstructTime(int64 time_in_int) { 389 base::string16 ConstructTime(int64 time_in_int) {
390 base::Time time = base::Time::FromInternalValue(time_in_int); 390 base::Time time = base::Time::FromInternalValue(time_in_int);
391 391
392 // If time is null the format function returns a time in 1969. 392 // If time is null the format function returns a time in 1969.
393 if (time.is_null()) 393 if (time.is_null())
394 return base::string16(); 394 return base::string16();
395 return base::TimeFormatFriendlyDateAndTime(time); 395 return base::TimeFormatFriendlyDateAndTime(time);
396 } 396 }
397 397
398 } // namespace sync_ui_util 398 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_startup_tracker.h ('k') | chrome/browser/sync/sync_ui_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698