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

Side by Side Diff: chrome/browser/ui/webui/browsing_history_handler.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/webui/browsing_history_handler.h" 5 #include "chrome/browser/ui/webui/browsing_history_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void GetDeviceNameAndType(const browser_sync::ProfileSyncService* sync_service, 139 void GetDeviceNameAndType(const browser_sync::ProfileSyncService* sync_service,
140 const std::string& client_id, 140 const std::string& client_id,
141 std::string* name, 141 std::string* name,
142 std::string* type) { 142 std::string* type) {
143 // DeviceInfoTracker must be syncing in order for remote history entries to 143 // DeviceInfoTracker must be syncing in order for remote history entries to
144 // be available. 144 // be available.
145 DCHECK(sync_service); 145 DCHECK(sync_service);
146 DCHECK(sync_service->GetDeviceInfoTracker()); 146 DCHECK(sync_service->GetDeviceInfoTracker());
147 DCHECK(sync_service->GetDeviceInfoTracker()->IsSyncing()); 147 DCHECK(sync_service->GetDeviceInfoTracker()->IsSyncing());
148 148
149 std::unique_ptr<sync_driver::DeviceInfo> device_info = 149 std::unique_ptr<syncer::DeviceInfo> device_info =
150 sync_service->GetDeviceInfoTracker()->GetDeviceInfo(client_id); 150 sync_service->GetDeviceInfoTracker()->GetDeviceInfo(client_id);
151 if (device_info.get()) { 151 if (device_info.get()) {
152 *name = device_info->client_name(); 152 *name = device_info->client_name();
153 switch (device_info->device_type()) { 153 switch (device_info->device_type()) {
154 case sync_pb::SyncEnums::TYPE_PHONE: 154 case sync_pb::SyncEnums::TYPE_PHONE:
155 *type = kDeviceTypePhone; 155 *type = kDeviceTypePhone;
156 break; 156 break;
157 case sync_pb::SyncEnums::TYPE_TABLET: 157 case sync_pb::SyncEnums::TYPE_TABLET:
158 *type = kDeviceTypeTablet; 158 *type = kDeviceTypeTablet;
159 break; 159 break;
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 bool expired, 1005 bool expired,
1006 const history::URLRows& deleted_rows, 1006 const history::URLRows& deleted_rows,
1007 const std::set<GURL>& favicon_urls) { 1007 const std::set<GURL>& favicon_urls) {
1008 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) 1008 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_))
1009 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); 1009 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
1010 } 1010 }
1011 1011
1012 void BrowsingHistoryHandler::OnWebHistoryDeleted() { 1012 void BrowsingHistoryHandler::OnWebHistoryDeleted() {
1013 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); 1013 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
1014 } 1014 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/browsing_history_handler.h ('k') | chrome/browser/ui/webui/foreign_session_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698