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

Side by Side Diff: chrome/browser/bookmarks/enhanced_bookmarks_features.cc

Issue 447403003: Disable EnhancedBookmarkImageFetching on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« 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 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/bookmarks/enhanced_bookmarks_features.h" 5 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 10 matching lines...) Expand all
21 21
22 const char kFieldTrialName[] = "EnhancedBookmarks"; 22 const char kFieldTrialName[] = "EnhancedBookmarks";
23 23
24 // Get extension id from Finch EnhancedBookmarks group parameters. 24 // Get extension id from Finch EnhancedBookmarks group parameters.
25 std::string GetEnhancedBookmarksExtensionIdFromFinch() { 25 std::string GetEnhancedBookmarksExtensionIdFromFinch() {
26 return variations::GetVariationParamValue(kFieldTrialName, "id"); 26 return variations::GetVariationParamValue(kFieldTrialName, "id");
27 } 27 }
28 28
29 // Returns true if enhanced bookmarks experiment is enabled from Finch. 29 // Returns true if enhanced bookmarks experiment is enabled from Finch.
30 bool IsEnhancedBookmarksExperimentEnabledFromFinch() { 30 bool IsEnhancedBookmarksExperimentEnabledFromFinch() {
31 #if defined(OS_ANDROID)
32 return false;
33 #endif
31 std::string ext_id = GetEnhancedBookmarksExtensionIdFromFinch(); 34 std::string ext_id = GetEnhancedBookmarksExtensionIdFromFinch();
32 const extensions::FeatureProvider* feature_provider = 35 const extensions::FeatureProvider* feature_provider =
33 extensions::FeatureProvider::GetPermissionFeatures(); 36 extensions::FeatureProvider::GetPermissionFeatures();
34 extensions::Feature* feature = feature_provider->GetFeature("metricsPrivate"); 37 extensions::Feature* feature = feature_provider->GetFeature("metricsPrivate");
35 return feature && feature->IsIdInWhitelist(ext_id); 38 return feature && feature->IsIdInWhitelist(ext_id);
36 } 39 }
37 40
38 }; // namespace 41 }; // namespace
39 42
40 bool GetBookmarksExperimentExtensionID(const PrefService* user_prefs, 43 bool GetBookmarksExperimentExtensionID(const PrefService* user_prefs,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (CommandLine::ForCurrentProcess()-> 209 if (CommandLine::ForCurrentProcess()->
207 HasSwitch(switches::kEnableSyncArticles)) { 210 HasSwitch(switches::kEnableSyncArticles)) {
208 return true; 211 return true;
209 } 212 }
210 if (variations::GetVariationParamValue( 213 if (variations::GetVariationParamValue(
211 kFieldTrialName, "enable-sync-articles") == "1") 214 kFieldTrialName, "enable-sync-articles") == "1")
212 return true; 215 return true;
213 216
214 return false; 217 return false;
215 } 218 }
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