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

Unified Diff: chrome/browser/ui/webui/history_ui.cc

Issue 566623003: Refactor syncable DEVICE_INFO type from ChangeProcessor to SyncableService - part 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More CR feedback addressed in DeviceInfoSyncService. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/history_ui.cc
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 1c604f6e12d807b107aa67d4915051ec4f371a0e..f65ddc257150cdca1e6f5af435afd9580ca4ccc5 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -233,9 +233,11 @@ void GetDeviceNameAndType(const ProfileSyncService* sync_service,
const std::string& client_id,
std::string* name,
std::string* type) {
- if (sync_service && sync_service->sync_initialized()) {
+ // DeviceInfoTracker becomes available when Sync backend gets initialed.
+ // It must exist in order for remote history entries to be available.
+ if (sync_service && sync_service->GetDeviceInfoTracker()) {
scoped_ptr<browser_sync::DeviceInfo> device_info =
- sync_service->GetDeviceInfo(client_id);
+ sync_service->GetDeviceInfoTracker()->GetDeviceInfo(client_id);
if (device_info.get()) {
*name = device_info->client_name();
switch (device_info->device_type()) {
@@ -251,7 +253,7 @@ void GetDeviceNameAndType(const ProfileSyncService* sync_service,
return;
}
} else {
- NOTREACHED() << "Got a remote history entry but no ProfileSyncService.";
+ NOTREACHED() << "Got a remote history entry but no DeviceInfoTracker.";
}
*name = l10n_util::GetStringUTF8(IDS_HISTORY_UNKNOWN_DEVICE);
*type = kDeviceTypeLaptop;
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698