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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 183013010: Don't send touchcancel on touch scroll start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a couple tests Created 6 years, 9 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 | Annotate | Revision Log
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/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 const Experiment::Choice kNotificationCenterTrayBehaviorChoices[] = { 365 const Experiment::Choice kNotificationCenterTrayBehaviorChoices[] = {
366 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 366 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
367 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NEVER, 367 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_NEVER,
368 message_center::switches::kNotificationCenterTrayBehavior, "never" }, 368 message_center::switches::kNotificationCenterTrayBehavior, "never" },
369 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_ALWAYS, 369 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_ALWAYS,
370 message_center::switches::kNotificationCenterTrayBehavior, "always" }, 370 message_center::switches::kNotificationCenterTrayBehavior, "always" },
371 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_UNREAD, 371 { IDS_FLAGS_NOTIFICATION_TRAY_BEHAVIOR_UNREAD,
372 message_center::switches::kNotificationCenterTrayBehavior, "unread" } 372 message_center::switches::kNotificationCenterTrayBehavior, "unread" }
373 }; 373 };
374 374
375 const Experiment::Choice kTouchScrollingModeChoices[] = {
376 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
377 { IDS_FLAGS_TOUCH_SCROLLING_MODE_TOUCHCANCEL,
378 switches::kTouchScrollingMode,
379 switches::kTouchScrollingModeTouchcancel },
380 { IDS_FLAGS_TOUCH_SCROLLING_MODE_ABSORB_TOUCHMOVE,
381 switches::kTouchScrollingMode,
382 switches::kTouchScrollingModeAbsorbTouchmove },
383 { IDS_FLAGS_TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE,
384 switches::kTouchScrollingMode,
385 switches::kTouchScrollingModeSyncTouchmove },
386 };
387
375 // RECORDING USER METRICS FOR FLAGS: 388 // RECORDING USER METRICS FOR FLAGS:
376 // ----------------------------------------------------------------------------- 389 // -----------------------------------------------------------------------------
377 // The first line of the experiment is the internal name. If you'd like to 390 // The first line of the experiment is the internal name. If you'd like to
378 // gather statistics about the usage of your flag, you should append a marker 391 // gather statistics about the usage of your flag, you should append a marker
379 // comment to the end of the feature name, like so: 392 // comment to the end of the feature name, like so:
380 // "my-special-feature", // FLAGS:RECORD_UMA 393 // "my-special-feature", // FLAGS:RECORD_UMA
381 // 394 //
382 // After doing that, run //tools/metrics/actions/extract_actions.py (see 395 // After doing that, run //tools/metrics/actions/extract_actions.py (see
383 // instructions at the top of that file for details) to update the 396 // instructions at the top of that file for details) to update the
384 // chromeactions.txt file, which will enable UMA to record your feature flag. 397 // chromeactions.txt file, which will enable UMA to record your feature flag.
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 }, 1914 },
1902 #if defined(ENABLE_APP_LIST) 1915 #if defined(ENABLE_APP_LIST)
1903 { 1916 {
1904 "enable-experimental-app-list", 1917 "enable-experimental-app-list",
1905 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME, 1918 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_NAME,
1906 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION, 1919 IDS_FLAGS_ENABLE_EXPERIMENTAL_APP_LIST_DESCRIPTION,
1907 kOsWin | kOsLinux | kOsCrOS, 1920 kOsWin | kOsLinux | kOsCrOS,
1908 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList) 1921 SINGLE_VALUE_TYPE(app_list::switches::kEnableExperimentalAppList)
1909 }, 1922 },
1910 #endif 1923 #endif
1924 {
1925 "touch-scrolling-mode",
1926 IDS_FLAGS_TOUCH_SCROLLING_MODE_NAME,
1927 IDS_FLAGS_TOUCH_SCROLLING_MODE_DESCRIPTION,
1928 kOsWin | kOsLinux | kOsCrOS | kOsAndroid,
1929 MULTI_VALUE_TYPE(kTouchScrollingModeChoices)
1930 },
1911 }; 1931 };
1912 1932
1913 const Experiment* experiments = kExperiments; 1933 const Experiment* experiments = kExperiments;
1914 size_t num_experiments = arraysize(kExperiments); 1934 size_t num_experiments = arraysize(kExperiments);
1915 1935
1916 // Stores and encapsulates the little state that about:flags has. 1936 // Stores and encapsulates the little state that about:flags has.
1917 class FlagsState { 1937 class FlagsState {
1918 public: 1938 public:
1919 FlagsState() : needs_restart_(false) {} 1939 FlagsState() : needs_restart_(false) {}
1920 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, 1940 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 } 2440 }
2421 2441
2422 const Experiment* GetExperiments(size_t* count) { 2442 const Experiment* GetExperiments(size_t* count) {
2423 *count = num_experiments; 2443 *count = num_experiments;
2424 return experiments; 2444 return experiments;
2425 } 2445 }
2426 2446
2427 } // namespace testing 2447 } // namespace testing
2428 2448
2429 } // namespace about_flags 2449 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698