OLD | NEW |
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 std::string device_type; | 231 std::string device_type; |
232 if (!entry->client_id.empty()) | 232 if (!entry->client_id.empty()) |
233 GetDeviceNameAndType(sync_service, entry->client_id, &device_name, | 233 GetDeviceNameAndType(sync_service, entry->client_id, &device_name, |
234 &device_type); | 234 &device_type); |
235 result->SetString("deviceName", device_name); | 235 result->SetString("deviceName", device_name); |
236 result->SetString("deviceType", device_type); | 236 result->SetString("deviceType", device_type); |
237 | 237 |
238 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 238 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
239 if (supervised_user_service) { | 239 if (supervised_user_service) { |
240 const SupervisedUserURLFilter* url_filter = | 240 const SupervisedUserURLFilter* url_filter = |
241 supervised_user_service->GetURLFilterForUIThread(); | 241 supervised_user_service->GetURLFilter(); |
242 int filtering_behavior = | 242 int filtering_behavior = |
243 url_filter->GetFilteringBehaviorForURL(entry->url.GetWithEmptyPath()); | 243 url_filter->GetFilteringBehaviorForURL(entry->url.GetWithEmptyPath()); |
244 is_blocked_visit = entry->blocked_visit; | 244 is_blocked_visit = entry->blocked_visit; |
245 host_filtering_behavior = filtering_behavior; | 245 host_filtering_behavior = filtering_behavior; |
246 } | 246 } |
247 #endif | 247 #endif |
248 | 248 |
249 result->SetString("dateTimeOfDay", date_time_of_day); | 249 result->SetString("dateTimeOfDay", date_time_of_day); |
250 result->SetString("dateRelativeDay", date_relative_day); | 250 result->SetString("dateRelativeDay", date_relative_day); |
251 result->SetString("snippet", snippet_string); | 251 result->SetString("snippet", snippet_string); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); | 552 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); |
553 } | 553 } |
554 | 554 |
555 void BrowsingHistoryHandler::HasOtherFormsOfBrowsingHistory( | 555 void BrowsingHistoryHandler::HasOtherFormsOfBrowsingHistory( |
556 bool has_other_forms, | 556 bool has_other_forms, |
557 bool has_synced_results) { | 557 bool has_synced_results) { |
558 web_ui()->CallJavascriptFunctionUnsafe("showNotification", | 558 web_ui()->CallJavascriptFunctionUnsafe("showNotification", |
559 base::Value(has_synced_results), | 559 base::Value(has_synced_results), |
560 base::Value(has_other_forms)); | 560 base::Value(has_other_forms)); |
561 } | 561 } |
OLD | NEW |