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

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

Issue 686393003: enabled enhanced bookmarks flag for all users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 } 2119 }
2120 2120
2121 void GetSanitizedEnabledFlags( 2121 void GetSanitizedEnabledFlags(
2122 FlagsStorage* flags_storage, std::set<std::string>* result) { 2122 FlagsStorage* flags_storage, std::set<std::string>* result) {
2123 SanitizeList(flags_storage); 2123 SanitizeList(flags_storage);
2124 *result = flags_storage->GetFlags(); 2124 *result = flags_storage->GetFlags();
2125 } 2125 }
2126 2126
2127 bool SkipConditionalExperiment(const Experiment& experiment, 2127 bool SkipConditionalExperiment(const Experiment& experiment,
2128 FlagsStorage* flags_storage) { 2128 FlagsStorage* flags_storage) {
2129 if (experiment.internal_name ==
2130 std::string("enhanced-bookmarks-experiment")) {
2131 #if defined(OS_ANDROID)
noyau (Ping after 24h) 2014/10/31 01:43:44 You can put " || defined(OS_IOS) in there as well.
2132 // On Android, user can opt in.
2133 return false;
2134 #else
2135 CommandLine* command_line = CommandLine::ForCurrentProcess();
2136 // Dont't skip experiment if it has non default value.
2137 // It means user selected it.
2138 if (command_line->HasSwitch(switches::kEnhancedBookmarksExperiment))
2139 return false;
2140
2141 return !IsEnhancedBookmarksExperimentEnabled(flags_storage);
2142 #endif
2143 }
2144
2145 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) || 2129 if ((experiment.internal_name == std::string("manual-enhanced-bookmarks")) ||
2146 (experiment.internal_name == 2130 (experiment.internal_name ==
2147 std::string("manual-enhanced-bookmarks-optout"))) { 2131 std::string("manual-enhanced-bookmarks-optout"))) {
2148 return true; 2132 return true;
2149 } 2133 }
2150 2134
2151 #if defined(OS_ANDROID) 2135 #if defined(OS_ANDROID)
2152 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel. 2136 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2153 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && 2137 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
2154 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && 2138 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA &&
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2615 } 2599 }
2616 2600
2617 const Experiment* GetExperiments(size_t* count) { 2601 const Experiment* GetExperiments(size_t* count) {
2618 *count = num_experiments; 2602 *count = num_experiments;
2619 return experiments; 2603 return experiments;
2620 } 2604 }
2621 2605
2622 } // namespace testing 2606 } // namespace testing
2623 2607
2624 } // namespace about_flags 2608 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698