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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.cc

Issue 2127403002: Make browsing_data component a layered component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed output_name from components/browsing_data/content/BUILD.gn Created 4 years, 5 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/settings/settings_clear_browsing_data_handler. h" 5 #include "chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/metrics/sparse_histogram.h" 12 #include "base/metrics/sparse_histogram.h"
13 #include "chrome/browser/browsing_data/browsing_data_counter_factory.h" 13 #include "chrome/browser/browsing_data/browsing_data_counter_factory.h"
14 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" 14 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h"
15 #include "chrome/browser/browsing_data/browsing_data_helper.h" 15 #include "chrome/browser/browsing_data/browsing_data_helper.h"
16 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" 16 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h"
17 #include "chrome/browser/history/web_history_service_factory.h" 17 #include "chrome/browser/history/web_history_service_factory.h"
18 #include "chrome/browser/sync/profile_sync_service_factory.h" 18 #include "chrome/browser/sync/profile_sync_service_factory.h"
19 #include "chrome/common/channel_info.h" 19 #include "chrome/common/channel_info.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "components/browsing_data/pref_names.h" 21 #include "components/browsing_data/core/pref_names.h"
22 #include "components/browsing_data_ui/history_notice_utils.h" 22 #include "components/browsing_data_ui/history_notice_utils.h"
23 #include "components/prefs/pref_service.h" 23 #include "components/prefs/pref_service.h"
24 #include "content/public/browser/web_ui.h" 24 #include "content/public/browser/web_ui.h"
25 25
26 namespace { 26 namespace {
27 27
28 const int kMaxTimesHistoryNoticeShown = 1; 28 const int kMaxTimesHistoryNoticeShown = 1;
29 29
30 // TODO(msramek): Get the list of deletion preferences from the JS side. 30 // TODO(msramek): Get the list of deletion preferences from the JS side.
31 const char* kCounterPrefs[] = { 31 const char* kCounterPrefs[] = {
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 void ClearBrowsingDataHandler::UpdateCounterText( 286 void ClearBrowsingDataHandler::UpdateCounterText(
287 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 287 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
288 CallJavascriptFunction( 288 CallJavascriptFunction(
289 "cr.webUIListenerCallback", 289 "cr.webUIListenerCallback",
290 base::StringValue("update-counter-text"), 290 base::StringValue("update-counter-text"),
291 base::StringValue(result->source()->GetPrefName()), 291 base::StringValue(result->source()->GetPrefName()),
292 base::StringValue(GetCounterTextFromResult(result.get()))); 292 base::StringValue(GetCounterTextFromResult(result.get())));
293 } 293 }
294 294
295 } // namespace settings 295 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_clear_browsing_data_handler.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698