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

Side by Side Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.cc

Issue 1432563002: Enable 'Browsing data volume counters on Desktop' by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed histograms.xml. Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/options/clear_browser_data_handler.h" 5 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 24 matching lines...) Expand all
35 #include "ui/base/accelerators/accelerator.h" 35 #include "ui/base/accelerators/accelerator.h"
36 #include "ui/base/l10n/l10n_util.h" 36 #include "ui/base/l10n/l10n_util.h"
37 #include "ui/events/keycodes/keyboard_codes.h" 37 #include "ui/events/keycodes/keyboard_codes.h"
38 38
39 namespace { 39 namespace {
40 40
41 const char kClearBrowsingDataLearnMoreUrl[] = 41 const char kClearBrowsingDataLearnMoreUrl[] =
42 "https://support.google.com/chrome/?p=settings_clear_browsing_data"; 42 "https://support.google.com/chrome/?p=settings_clear_browsing_data";
43 43
44 bool AreCountersEnabled() { 44 bool AreCountersEnabled() {
45 return base::CommandLine::ForCurrentProcess()->HasSwitch( 45 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
46 switches::kEnableClearBrowsingDataCounters); 46 switches::kEnableClearBrowsingDataCounters)) {
47 return true;
48 }
49
50 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
51 switches::kDisableClearBrowsingDataCounters)) {
52 return false;
53 }
54
55 // Enabled by default.
56 return true;
47 } 57 }
48 58
49 } // namespace 59 } // namespace
50 60
51 namespace options { 61 namespace options {
52 62
53 ClearBrowserDataHandler::ClearBrowserDataHandler() 63 ClearBrowserDataHandler::ClearBrowserDataHandler()
54 : remover_(nullptr), 64 : remover_(nullptr),
55 sync_service_(nullptr) { 65 sync_service_(nullptr) {
56 } 66 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 base::StringValue(text)); 346 base::StringValue(text));
337 } 347 }
338 348
339 void ClearBrowserDataHandler::OnStateChanged() { 349 void ClearBrowserDataHandler::OnStateChanged() {
340 web_ui()->CallJavascriptFunction( 350 web_ui()->CallJavascriptFunction(
341 "ClearBrowserDataOverlay.updateSyncWarning", 351 "ClearBrowserDataOverlay.updateSyncWarning",
342 base::FundamentalValue(sync_service_ && sync_service_->IsSyncActive())); 352 base::FundamentalValue(sync_service_ && sync_service_->IsSyncActive()));
343 } 353 }
344 354
345 } // namespace options 355 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698