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

Side by Side Diff: chrome/browser/ui/webui/chromeos/salsa_ui.cc

Issue 630003003: Change GestureConfiguration types to be consistent with each other and with the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix compile Created 6 years, 2 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
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/salsa_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/salsa_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/web_ui.h" 16 #include "content/public/browser/web_ui.h"
17 #include "content/public/browser/web_ui_data_source.h" 17 #include "content/public/browser/web_ui_data_source.h"
18 #include "grit/browser_resources.h" 18 #include "grit/browser_resources.h"
19 19
20 // Whitelist of which preferences are possible targets for Salsa treatments. 20 // Whitelist of which preferences are possible targets for Salsa treatments.
21 // If new preferences are added and they are to be used in an experiment, then 21 // If new preferences are added and they are to be used in an experiment, then
22 // they must be added to this list as well to keep chrome://salsa from 22 // they must be added to this list as well to keep chrome://salsa from
23 // changing arbitrary values. 23 // changing arbitrary values.
24 24
25 namespace { 25 namespace {
26 26
27 const char* kWhitelist[] = { 27 const char* kWhitelist[] = {
28 prefs::kMaxSeparationForGestureTouchesInPixels, 28 prefs::kMaxSeparationForGestureTouchesInPixels,
29 prefs::kTabScrubActivationDelayInMS, 29 prefs::kTabScrubActivationDelayInMs,
30 prefs::kOverscrollHorizontalThresholdComplete, 30 prefs::kOverscrollHorizontalThresholdComplete,
31 prefs::kOverscrollVerticalThresholdComplete, 31 prefs::kOverscrollVerticalThresholdComplete,
32 prefs::kOverscrollMinimumThresholdStart, 32 prefs::kOverscrollMinimumThresholdStart,
33 prefs::kOverscrollVerticalThresholdStart, 33 prefs::kOverscrollVerticalThresholdStart,
34 prefs::kOverscrollHorizontalResistThreshold, 34 prefs::kOverscrollHorizontalResistThreshold,
35 prefs::kOverscrollVerticalResistThreshold, 35 prefs::kOverscrollVerticalResistThreshold,
36 }; 36 };
37 37
38 void RevertPreferences(PrefService* prefs, 38 void RevertPreferences(PrefService* prefs,
39 std::map<int, const base::Value*>* vals) { 39 std::map<int, const base::Value*>* vals) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 if (!pref) 149 if (!pref)
150 return; 150 return;
151 151
152 // Get our own copy of the user defined value or NULL if they are using the 152 // Get our own copy of the user defined value or NULL if they are using the
153 // default. You have to make a copy since they'll be used in the destructor 153 // default. You have to make a copy since they'll be used in the destructor
154 // to restore the values and we need to make sure they're still around. 154 // to restore the values and we need to make sure they're still around.
155 orig_values_[index] = 155 orig_values_[index] =
156 pref->IsDefaultValue() ? NULL : pref->GetValue()->DeepCopy(); 156 pref->IsDefaultValue() ? NULL : pref->GetValue()->DeepCopy();
157 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698