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

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

Issue 1658723007: Prototype handling of Intents in Custom Tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Histogram for unit test Created 4 years, 10 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 (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 <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 #if defined(OS_ANDROID) 514 #if defined(OS_ANDROID)
515 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = { 515 const FeatureEntry::Choice kEnableOfflinePagesChoices[] = {
516 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""}, 516 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
517 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS, 517 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_BOOKMARKS,
518 switches::kEnableOfflinePagesAsBookmarks, ""}, 518 switches::kEnableOfflinePagesAsBookmarks, ""},
519 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES, 519 {IDS_FLAGS_ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES,
520 switches::kEnableOfflinePagesAsSavedPages, ""}, 520 switches::kEnableOfflinePagesAsSavedPages, ""},
521 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages, 521 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableOfflinePages,
522 ""}, 522 ""},
523 }; 523 };
524
525 const FeatureEntry::Choice kHerbPrototypeChoices[] = {
526 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, "", ""},
527 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_ANISE, switches::kHerbFlavor, "anise"},
528 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_BASIL, switches::kHerbFlavor, "basil"},
529 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_CHIVE, switches::kHerbFlavor, "chive"},
530 {IDS_FLAGS_HERB_PROTOTYPE_FLAVOR_DILL, switches::kHerbFlavor, "dill"},
531 };
524 #endif // defined(OS_ANDROID) 532 #endif // defined(OS_ANDROID)
525 533
526 // RECORDING USER METRICS FOR FLAGS: 534 // RECORDING USER METRICS FOR FLAGS:
527 // ----------------------------------------------------------------------------- 535 // -----------------------------------------------------------------------------
528 // The first line of the entry is the internal name. If you'd like to gather 536 // The first line of the entry is the internal name. If you'd like to gather
529 // statistics about the usage of your flag, you should append a marker comment 537 // statistics about the usage of your flag, you should append a marker comment
530 // to the end of the feature name, like so: 538 // to the end of the feature name, like so:
531 // "my-special-feature", // FLAGS:RECORD_UMA 539 // "my-special-feature", // FLAGS:RECORD_UMA
532 // 540 //
533 // After doing that, run 541 // After doing that, run
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) 2044 #if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
2037 {"enable-autofill-credit-card-upload", 2045 {"enable-autofill-credit-card-upload",
2038 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_NAME, 2046 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_NAME,
2039 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_DESCRIPTION, 2047 IDS_FLAGS_AUTOFILL_CREDIT_CARD_UPLOAD_DESCRIPTION,
2040 kOsCrOS | kOsWin | kOsLinux | kOsAndroid, 2048 kOsCrOS | kOsWin | kOsLinux | kOsAndroid,
2041 ENABLE_DISABLE_VALUE_TYPE( 2049 ENABLE_DISABLE_VALUE_TYPE(
2042 autofill::switches::kEnableOfferUploadCreditCards, 2050 autofill::switches::kEnableOfferUploadCreditCards,
2043 autofill::switches::kDisableOfferUploadCreditCards)}, 2051 autofill::switches::kDisableOfferUploadCreditCards)},
2044 #endif // defined(TOOLKIT_VIEWS) || defined(OS_ANDROID) 2052 #endif // defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
2045 #if defined(OS_ANDROID) 2053 #if defined(OS_ANDROID)
2054 {"herb-prototype-choices",
2055 IDS_FLAGS_HERB_PROTOTYPE_CHOICES_NAME,
2056 IDS_FLAGS_HERB_PROTOTYPE_CHOICES_DESCRIPTION, kOsAndroid,
2057 MULTI_VALUE_TYPE(kHerbPrototypeChoices)},
2046 {"enable-tab-switcher-in-document-mode", 2058 {"enable-tab-switcher-in-document-mode",
2047 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_NAME, 2059 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_NAME,
2048 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_DESCRIPTION, kOsAndroid, 2060 IDS_FLAGS_TAB_SWITCHER_IN_DOCUMENT_MODE_DESCRIPTION, kOsAndroid,
2049 SINGLE_VALUE_TYPE(switches::kEnableTabSwitcherInDocumentMode)}, 2061 SINGLE_VALUE_TYPE(switches::kEnableTabSwitcherInDocumentMode)},
2050 #endif // OS_ANDROID 2062 #endif // OS_ANDROID
2051 {"enable-md-history", 2063 {"enable-md-history",
2052 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_NAME, 2064 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_NAME,
2053 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_DESCRIPTION, 2065 IDS_FLAGS_ENABLE_MATERIAL_DESIGN_HISTORY_DESCRIPTION,
2054 kOsDesktop | kOsAndroid, 2066 kOsDesktop | kOsAndroid,
2055 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignHistory)}, 2067 SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignHistory)},
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 } 2192 }
2181 // enable-data-reduction-proxy-carrier-test is only available for Chromium 2193 // enable-data-reduction-proxy-carrier-test is only available for Chromium
2182 // builds and the Canary/Dev channel. 2194 // builds and the Canary/Dev channel.
2183 if (!strcmp("enable-data-reduction-proxy-carrier-test", 2195 if (!strcmp("enable-data-reduction-proxy-carrier-test",
2184 entry.internal_name) && 2196 entry.internal_name) &&
2185 channel != version_info::Channel::DEV && 2197 channel != version_info::Channel::DEV &&
2186 channel != version_info::Channel::CANARY && 2198 channel != version_info::Channel::CANARY &&
2187 channel != version_info::Channel::UNKNOWN) { 2199 channel != version_info::Channel::UNKNOWN) {
2188 return true; 2200 return true;
2189 } 2201 }
2202 // enable-herb-prototype is only available for local, Canary, and Dev channel
2203 // builds.
2204 if (!strcmp(switches::kHerbFlavor, entry.internal_name) &&
2205 channel != version_info::Channel::DEV &&
2206 channel != version_info::Channel::CANARY &&
2207 channel != version_info::Channel::UNKNOWN) {
2208 return true;
2209 }
2190 // enable-tab-switcher-in-document-mode is only available for Chromium 2210 // enable-tab-switcher-in-document-mode is only available for Chromium
2191 // builds and the Canary channel. 2211 // builds and the Canary channel.
2192 if (!strcmp("enable-tab-switcher-in-document-mode", 2212 if (!strcmp("enable-tab-switcher-in-document-mode",
2193 entry.internal_name) && 2213 entry.internal_name) &&
2194 channel != version_info::Channel::CANARY && 2214 channel != version_info::Channel::CANARY &&
2195 channel != version_info::Channel::UNKNOWN) { 2215 channel != version_info::Channel::UNKNOWN) {
2196 return true; 2216 return true;
2197 } 2217 }
2198 #endif 2218 #endif
2199 2219
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2365 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2346 2366
2347 const FeatureEntry* GetFeatureEntries(size_t* count) { 2367 const FeatureEntry* GetFeatureEntries(size_t* count) {
2348 *count = arraysize(kFeatureEntries); 2368 *count = arraysize(kFeatureEntries);
2349 return kFeatureEntries; 2369 return kFeatureEntries;
2350 } 2370 }
2351 2371
2352 } // namespace testing 2372 } // namespace testing
2353 2373
2354 } // namespace about_flags 2374 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698