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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "components/query_parser/snippet.h" 51 #include "components/query_parser/snippet.h"
52 #include "components/strings/grit/components_strings.h" 52 #include "components/strings/grit/components_strings.h"
53 #include "components/sync/device_info/device_info.h" 53 #include "components/sync/device_info/device_info.h"
54 #include "components/sync/device_info/device_info_tracker.h" 54 #include "components/sync/device_info/device_info_tracker.h"
55 #include "components/sync/driver/sync_service_observer.h" 55 #include "components/sync/driver/sync_service_observer.h"
56 #include "components/sync/protocol/history_delete_directive_specifics.pb.h" 56 #include "components/sync/protocol/history_delete_directive_specifics.pb.h"
57 #include "components/sync/protocol/sync_enums.pb.h" 57 #include "components/sync/protocol/sync_enums.pb.h"
58 #include "components/url_formatter/url_formatter.h" 58 #include "components/url_formatter/url_formatter.h"
59 #include "content/public/browser/url_data_source.h" 59 #include "content/public/browser/url_data_source.h"
60 #include "content/public/browser/web_ui.h" 60 #include "content/public/browser/web_ui.h"
61 #include "extensions/features/features.h"
61 #include "ui/base/l10n/l10n_util.h" 62 #include "ui/base/l10n/l10n_util.h"
62 #include "ui/base/l10n/time_format.h" 63 #include "ui/base/l10n/time_format.h"
63 64
64 #if defined(ENABLE_EXTENSIONS) 65 #if BUILDFLAG(ENABLE_EXTENSIONS)
65 #include "chrome/browser/extensions/activity_log/activity_log.h" 66 #include "chrome/browser/extensions/activity_log/activity_log.h"
66 #endif 67 #endif
67 68
68 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 69 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
69 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" 70 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h"
70 #include "chrome/browser/supervised_user/supervised_user_service.h" 71 #include "chrome/browser/supervised_user/supervised_user_service.h"
71 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 72 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
72 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" 73 #include "chrome/browser/supervised_user/supervised_user_url_filter.h"
73 #endif 74 #endif
74 75
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 &delete_task_tracker_); 622 &delete_task_tracker_);
622 623
623 if (web_history) { 624 if (web_history) {
624 has_pending_delete_request_ = true; 625 has_pending_delete_request_ = true;
625 web_history->ExpireHistory( 626 web_history->ExpireHistory(
626 expire_list, 627 expire_list,
627 base::Bind(&BrowsingHistoryHandler::RemoveWebHistoryComplete, 628 base::Bind(&BrowsingHistoryHandler::RemoveWebHistoryComplete,
628 weak_factory_.GetWeakPtr())); 629 weak_factory_.GetWeakPtr()));
629 } 630 }
630 631
631 #if defined(ENABLE_EXTENSIONS) 632 #if BUILDFLAG(ENABLE_EXTENSIONS)
632 // If the profile has activity logging enabled also clean up any URLs from 633 // If the profile has activity logging enabled also clean up any URLs from
633 // the extension activity log. The extension activity log contains URLS 634 // the extension activity log. The extension activity log contains URLS
634 // which websites an extension has activity on so it will indirectly 635 // which websites an extension has activity on so it will indirectly
635 // contain websites that a user has visited. 636 // contain websites that a user has visited.
636 extensions::ActivityLog* activity_log = 637 extensions::ActivityLog* activity_log =
637 extensions::ActivityLog::GetInstance(profile); 638 extensions::ActivityLog::GetInstance(profile);
638 for (std::vector<history::ExpireHistoryArgs>::const_iterator it = 639 for (std::vector<history::ExpireHistoryArgs>::const_iterator it =
639 expire_list.begin(); it != expire_list.end(); ++it) { 640 expire_list.begin(); it != expire_list.end(); ++it) {
640 activity_log->RemoveURLs(it->urls); 641 activity_log->RemoveURLs(it->urls);
641 } 642 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 const history::URLRows& deleted_rows, 1007 const history::URLRows& deleted_rows,
1007 const std::set<GURL>& favicon_urls) { 1008 const std::set<GURL>& favicon_urls) {
1008 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_)) 1009 if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_))
1009 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); 1010 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
1010 } 1011 }
1011 1012
1012 void BrowsingHistoryHandler::OnWebHistoryDeleted() { 1013 void BrowsingHistoryHandler::OnWebHistoryDeleted() {
1013 if (!has_pending_delete_request_) 1014 if (!has_pending_delete_request_)
1014 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted"); 1015 web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
1015 } 1016 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/unload_controller.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698