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 | 10 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 const SupervisedUserURLFilter* url_filter = | 266 const SupervisedUserURLFilter* url_filter = |
267 supervised_user_service->GetURLFilterForUIThread(); | 267 supervised_user_service->GetURLFilterForUIThread(); |
268 int filtering_behavior = | 268 int filtering_behavior = |
269 url_filter->GetFilteringBehaviorForURL(url.GetWithEmptyPath()); | 269 url_filter->GetFilteringBehaviorForURL(url.GetWithEmptyPath()); |
270 result->SetInteger("hostFilteringBehavior", filtering_behavior); | 270 result->SetInteger("hostFilteringBehavior", filtering_behavior); |
271 | 271 |
272 result->SetBoolean("blockedVisit", blocked_visit); | 272 result->SetBoolean("blockedVisit", blocked_visit); |
273 } | 273 } |
274 #endif | 274 #endif |
275 | 275 |
276 return result.Pass(); | 276 return result; |
277 } | 277 } |
278 | 278 |
279 bool BrowsingHistoryHandler::HistoryEntry::SortByTimeDescending( | 279 bool BrowsingHistoryHandler::HistoryEntry::SortByTimeDescending( |
280 const BrowsingHistoryHandler::HistoryEntry& entry1, | 280 const BrowsingHistoryHandler::HistoryEntry& entry1, |
281 const BrowsingHistoryHandler::HistoryEntry& entry2) { | 281 const BrowsingHistoryHandler::HistoryEntry& entry2) { |
282 return entry1.time > entry2.time; | 282 return entry1.time > entry2.time; |
283 } | 283 } |
284 | 284 |
285 BrowsingHistoryHandler::BrowsingHistoryHandler() | 285 BrowsingHistoryHandler::BrowsingHistoryHandler() |
286 : has_pending_delete_request_(false), | 286 : has_pending_delete_request_(false), |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 879 |
880 void BrowsingHistoryHandler::OnURLsDeleted( | 880 void BrowsingHistoryHandler::OnURLsDeleted( |
881 history::HistoryService* history_service, | 881 history::HistoryService* history_service, |
882 bool all_history, | 882 bool all_history, |
883 bool expired, | 883 bool expired, |
884 const history::URLRows& deleted_rows, | 884 const history::URLRows& deleted_rows, |
885 const std::set<GURL>& favicon_urls) { | 885 const std::set<GURL>& favicon_urls) { |
886 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) | 886 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) |
887 web_ui()->CallJavascriptFunction("historyDeleted"); | 887 web_ui()->CallJavascriptFunction("historyDeleted"); |
888 } | 888 } |
OLD | NEW |