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

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

Issue 134013004: [OriginChip] Add options for the position of the origin chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 344 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
345 switches::kDisableSearchButtonInOmnibox, ""}, 345 switches::kDisableSearchButtonInOmnibox, ""},
346 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR, 346 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR,
347 switches::kEnableSearchButtonInOmniboxForStr, ""}, 347 switches::kEnableSearchButtonInOmniboxForStr, ""},
348 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP, 348 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLE_FOR_STR_OR_IIP,
349 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""}, 349 switches::kEnableSearchButtonInOmniboxForStrOrIip, ""},
350 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED, 350 { IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_ENABLED,
351 switches::kEnableSearchButtonInOmniboxAlways, ""} 351 switches::kEnableSearchButtonInOmniboxAlways, ""}
352 }; 352 };
353 353
354 // See comment above for kSearchButtonInOmniboxChoices. The same reasoning
355 // applies here.
356 const Experiment::Choice kOriginChipChoices[] = {
357 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
358 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOriginChip, ""},
359 { IDS_FLAGS_ORIGIN_CHIP_LEFT_OF_LOCATION_BAR,
360 switches::kEnableOriginChipLeftOfLocationBar, ""},
361 { IDS_FLAGS_ORIGIN_CHIP_RIGHT_OF_LOCATION_BAR,
362 switches::kEnableOriginChipRightOfLocationBar, ""},
363 { IDS_FLAGS_ORIGIN_CHIP_LEFT_OF_MENU,
364 switches::kEnableOriginChipLeftOfMenu, ""}
365 };
366
354 // RECORDING USER METRICS FOR FLAGS: 367 // RECORDING USER METRICS FOR FLAGS:
355 // ----------------------------------------------------------------------------- 368 // -----------------------------------------------------------------------------
356 // The first line of the experiment is the internal name. If you'd like to 369 // The first line of the experiment is the internal name. If you'd like to
357 // gather statistics about the usage of your flag, you should append a marker 370 // gather statistics about the usage of your flag, you should append a marker
358 // comment to the end of the feature name, like so: 371 // comment to the end of the feature name, like so:
359 // "my-special-feature", // FLAGS:RECORD_UMA 372 // "my-special-feature", // FLAGS:RECORD_UMA
360 // 373 //
361 // After doing that, run //tools/metrics/actions/extract_actions.py (see 374 // After doing that, run //tools/metrics/actions/extract_actions.py (see
362 // instructions at the top of that file for details) to update the 375 // instructions at the top of that file for details) to update the
363 // chromeactions.txt file, which will enable UMA to record your feature flag. 376 // chromeactions.txt file, which will enable UMA to record your feature flag.
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 IDS_FLAGS_NUM_RASTER_THREADS_NAME, 1938 IDS_FLAGS_NUM_RASTER_THREADS_NAME,
1926 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION, 1939 IDS_FLAGS_NUM_RASTER_THREADS_DESCRIPTION,
1927 kOsAll, 1940 kOsAll,
1928 MULTI_VALUE_TYPE(kNumRasterThreadsChoices) 1941 MULTI_VALUE_TYPE(kNumRasterThreadsChoices)
1929 }, 1942 },
1930 { 1943 {
1931 "origin-chip", 1944 "origin-chip",
1932 IDS_FLAGS_ORIGIN_CHIP_NAME, 1945 IDS_FLAGS_ORIGIN_CHIP_NAME,
1933 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION, 1946 IDS_FLAGS_ORIGIN_CHIP_DESCRIPTION,
1934 kOsCrOS | kOsWin, 1947 kOsCrOS | kOsWin,
1935 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOriginChip, 1948 MULTI_VALUE_TYPE(kOriginChipChoices)
1936 switches::kDisableOriginChip)
1937 }, 1949 },
1938 { 1950 {
1939 "search-button-in-omnibox", 1951 "search-button-in-omnibox",
1940 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME, 1952 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_NAME,
1941 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION, 1953 IDS_FLAGS_SEARCH_BUTTON_IN_OMNIBOX_DESCRIPTION,
1942 kOsCrOS | kOsMac | kOsWin, 1954 kOsCrOS | kOsMac | kOsWin,
1943 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices) 1955 MULTI_VALUE_TYPE(kSearchButtonInOmniboxChoices)
1944 }, 1956 },
1945 { 1957 {
1946 "enable-ignore-autocomplete-off", 1958 "enable-ignore-autocomplete-off",
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2462 } 2474 }
2463 2475
2464 const Experiment* GetExperiments(size_t* count) { 2476 const Experiment* GetExperiments(size_t* count) {
2465 *count = num_experiments; 2477 *count = num_experiments;
2466 return experiments; 2478 return experiments;
2467 } 2479 }
2468 2480
2469 } // namespace testing 2481 } // namespace testing
2470 2482
2471 } // namespace about_flags 2483 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698