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

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

Issue 2594723002: Count number of origins with data affected by clearing "cookies and site data". (Closed)
Patch Set: Add comments for issues with incomplete data deletion Created 3 years, 11 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"
(...skipping 11 matching lines...) Expand all
22 #include "components/browsing_data/core/pref_names.h" 22 #include "components/browsing_data/core/pref_names.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[] = {
32 browsing_data::prefs::kDeleteBrowsingHistory, 32 browsing_data::prefs::kDeleteBrowsingHistory,
33 browsing_data::prefs::kDeleteCache, 33 browsing_data::prefs::kDeleteCache,
34 browsing_data::prefs::kDeleteDownloadHistory, 34 browsing_data::prefs::kDeleteCookies,
35 browsing_data::prefs::kDeleteFormData, 35 browsing_data::prefs::kDeleteDownloadHistory,
36 browsing_data::prefs::kDeleteHostedAppsData, 36 browsing_data::prefs::kDeleteFormData,
37 browsing_data::prefs::kDeleteMediaLicenses, 37 browsing_data::prefs::kDeleteHostedAppsData,
38 browsing_data::prefs::kDeletePasswords, 38 browsing_data::prefs::kDeleteMediaLicenses,
39 browsing_data::prefs::kDeletePasswords,
39 }; 40 };
40 41
41 } // namespace 42 } // namespace
42 43
43 namespace settings { 44 namespace settings {
44 45
45 // TaskObserver ---------------------------------------------------------------- 46 // TaskObserver ----------------------------------------------------------------
46 47
47 class ClearBrowsingDataHandler::TaskObserver 48 class ClearBrowsingDataHandler::TaskObserver
48 : public BrowsingDataRemover::Observer { 49 : public BrowsingDataRemover::Observer {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void ClearBrowsingDataHandler::UpdateCounterText( 321 void ClearBrowsingDataHandler::UpdateCounterText(
321 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 322 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
322 CallJavascriptFunction( 323 CallJavascriptFunction(
323 "cr.webUIListenerCallback", 324 "cr.webUIListenerCallback",
324 base::StringValue("update-counter-text"), 325 base::StringValue("update-counter-text"),
325 base::StringValue(result->source()->GetPrefName()), 326 base::StringValue(result->source()->GetPrefName()),
326 base::StringValue(GetChromeCounterTextFromResult(result.get()))); 327 base::StringValue(GetChromeCounterTextFromResult(result.get())));
327 } 328 }
328 329
329 } // namespace settings 330 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698