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

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

Issue 3165009: Convert TimeFormat (chrome/common/time_format.*) to string16 (from wstring). (Closed)
Patch Set: bar Created 10 years, 4 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
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/common/time_format.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 string16 ProfileSyncService::GetLastSyncedTimeString() const { 587 string16 ProfileSyncService::GetLastSyncedTimeString() const {
588 if (last_synced_time_.is_null()) 588 if (last_synced_time_.is_null())
589 return l10n_util::GetStringUTF16(IDS_SYNC_TIME_NEVER); 589 return l10n_util::GetStringUTF16(IDS_SYNC_TIME_NEVER);
590 590
591 base::TimeDelta last_synced = base::Time::Now() - last_synced_time_; 591 base::TimeDelta last_synced = base::Time::Now() - last_synced_time_;
592 592
593 if (last_synced < base::TimeDelta::FromMinutes(1)) 593 if (last_synced < base::TimeDelta::FromMinutes(1))
594 return l10n_util::GetStringUTF16(IDS_SYNC_TIME_JUST_NOW); 594 return l10n_util::GetStringUTF16(IDS_SYNC_TIME_JUST_NOW);
595 595
596 return WideToUTF16Hack(TimeFormat::TimeElapsed(last_synced)); 596 return TimeFormat::TimeElapsed(last_synced);
597 } 597 }
598 598
599 string16 ProfileSyncService::GetAuthenticatedUsername() const { 599 string16 ProfileSyncService::GetAuthenticatedUsername() const {
600 if (backend_.get() && backend_initialized_) 600 if (backend_.get() && backend_initialized_)
601 return backend_->GetAuthenticatedUsername(); 601 return backend_->GetAuthenticatedUsername();
602 else 602 else
603 return string16(); 603 return string16();
604 } 604 }
605 605
606 void ProfileSyncService::OnUserSubmittedAuth( 606 void ProfileSyncService::OnUserSubmittedAuth(
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 // is initialized, all enabled data types are consistent with one 840 // is initialized, all enabled data types are consistent with one
841 // another, and no unrecoverable error has transpired. 841 // another, and no unrecoverable error has transpired.
842 if (unrecoverable_error_detected_) 842 if (unrecoverable_error_detected_)
843 return false; 843 return false;
844 844
845 if (!data_type_manager_.get()) 845 if (!data_type_manager_.get())
846 return false; 846 return false;
847 847
848 return data_type_manager_->state() == DataTypeManager::CONFIGURED; 848 return data_type_manager_->state() == DataTypeManager::CONFIGURED;
849 } 849 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/common/time_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698