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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
14 #include "base/i18n/time_formatting.h" | 14 #include "base/i18n/time_formatting.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/prefs/pref_service.h" | |
17 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
18 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
19 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
20 #include "base/time/time.h" | 19 #include "base/time/time.h" |
21 #include "base/values.h" | 20 #include "base/values.h" |
22 #include "chrome/browser/banners/app_banner_settings_helper.h" | 21 #include "chrome/browser/banners/app_banner_settings_helper.h" |
23 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
24 #include "chrome/browser/engagement/site_engagement_service.h" | 23 #include "chrome/browser/engagement/site_engagement_service.h" |
25 #include "chrome/browser/history/history_service_factory.h" | 24 #include "chrome/browser/history/history_service_factory.h" |
26 #include "chrome/browser/history/history_utils.h" | 25 #include "chrome/browser/history/history_utils.h" |
27 #include "chrome/browser/history/web_history_service_factory.h" | 26 #include "chrome/browser/history/web_history_service_factory.h" |
28 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
29 #include "chrome/browser/sync/profile_sync_service_factory.h" | 28 #include "chrome/browser/sync/profile_sync_service_factory.h" |
30 #include "chrome/browser/ui/browser_finder.h" | 29 #include "chrome/browser/ui/browser_finder.h" |
31 #include "chrome/browser/ui/chrome_pages.h" | 30 #include "chrome/browser/ui/chrome_pages.h" |
32 #include "chrome/browser/ui/webui/favicon_source.h" | 31 #include "chrome/browser/ui/webui/favicon_source.h" |
33 #include "chrome/common/features.h" | 32 #include "chrome/common/features.h" |
34 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
35 #include "components/bookmarks/browser/bookmark_model.h" | 34 #include "components/bookmarks/browser/bookmark_model.h" |
36 #include "components/bookmarks/browser/bookmark_utils.h" | 35 #include "components/bookmarks/browser/bookmark_utils.h" |
37 #include "components/browser_sync/browser/profile_sync_service.h" | 36 #include "components/browser_sync/browser/profile_sync_service.h" |
38 #include "components/history/core/browser/history_service.h" | 37 #include "components/history/core/browser/history_service.h" |
39 #include "components/history/core/browser/history_types.h" | 38 #include "components/history/core/browser/history_types.h" |
40 #include "components/history/core/browser/web_history_service.h" | 39 #include "components/history/core/browser/web_history_service.h" |
41 #include "components/keyed_service/core/service_access_type.h" | 40 #include "components/keyed_service/core/service_access_type.h" |
| 41 #include "components/prefs/pref_service.h" |
42 #include "components/query_parser/snippet.h" | 42 #include "components/query_parser/snippet.h" |
43 #include "components/sync_driver/device_info.h" | 43 #include "components/sync_driver/device_info.h" |
44 #include "components/sync_driver/device_info_tracker.h" | 44 #include "components/sync_driver/device_info_tracker.h" |
45 #include "components/url_formatter/url_formatter.h" | 45 #include "components/url_formatter/url_formatter.h" |
46 #include "content/public/browser/url_data_source.h" | 46 #include "content/public/browser/url_data_source.h" |
47 #include "content/public/browser/web_ui.h" | 47 #include "content/public/browser/web_ui.h" |
48 #include "grit/components_strings.h" | 48 #include "grit/components_strings.h" |
49 #include "sync/protocol/history_delete_directive_specifics.pb.h" | 49 #include "sync/protocol/history_delete_directive_specifics.pb.h" |
50 #include "sync/protocol/sync_enums.pb.h" | 50 #include "sync/protocol/sync_enums.pb.h" |
51 #include "ui/base/l10n/l10n_util.h" | 51 #include "ui/base/l10n/l10n_util.h" |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 | 892 |
893 void BrowsingHistoryHandler::OnURLsDeleted( | 893 void BrowsingHistoryHandler::OnURLsDeleted( |
894 history::HistoryService* history_service, | 894 history::HistoryService* history_service, |
895 bool all_history, | 895 bool all_history, |
896 bool expired, | 896 bool expired, |
897 const history::URLRows& deleted_rows, | 897 const history::URLRows& deleted_rows, |
898 const std::set<GURL>& favicon_urls) { | 898 const std::set<GURL>& favicon_urls) { |
899 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) | 899 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) |
900 web_ui()->CallJavascriptFunction("historyDeleted"); | 900 web_ui()->CallJavascriptFunction("historyDeleted"); |
901 } | 901 } |
OLD | NEW |