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

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

Issue 177693004: Removed unnecessary condition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« 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/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 22 matching lines...) Expand all
33 DCHECK_EQ(id_hash.length(), base::kSHA1Length); 33 DCHECK_EQ(id_hash.length(), base::kSHA1Length);
34 std::string hash = base::HexEncode(id_hash.c_str(), id_hash.length()); 34 std::string hash = base::HexEncode(id_hash.c_str(), id_hash.length());
35 35
36 if (IsBookmarksExtensionHash(hash)) 36 if (IsBookmarksExtensionHash(hash))
37 return true; 37 return true;
38 } 38 }
39 return false; 39 return false;
40 } 40 }
41 41
42 bool OptInIntoBookmarksExperiment(BookmarksExperimentState state) { 42 bool OptInIntoBookmarksExperiment(BookmarksExperimentState state) {
43 if (base::FieldTrialList::FindFullName(kFieldTrialName) != "Default")
44 return false;
45
46 // Opt-in user into Finch group. 43 // Opt-in user into Finch group.
47 CommandLine* command_line = CommandLine::ForCurrentProcess(); 44 CommandLine* command_line = CommandLine::ForCurrentProcess();
48 if (state == kBookmarksExperimentEnabledUserOptOut) 45 if (state == kBookmarksExperimentEnabledUserOptOut)
49 command_line->AppendSwitch(switches::kManualEnhancedBookmarksOptout); 46 command_line->AppendSwitch(switches::kManualEnhancedBookmarksOptout);
50 else 47 else
51 command_line->AppendSwitch(switches::kManualEnhancedBookmarks); 48 command_line->AppendSwitch(switches::kManualEnhancedBookmarks);
52 49
53 return true; 50 return true;
54 } 51 }
55 52
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (chrome_variations::GetVariationParamValue( 84 if (chrome_variations::GetVariationParamValue(
88 kFieldTrialName, "enable-sync-articles") == "1") 85 kFieldTrialName, "enable-sync-articles") == "1")
89 return true; 86 return true;
90 87
91 return false; 88 return false;
92 } 89 }
93 90
94 std::string GetEnhancedBookmarksExtensionIdFromFinch() { 91 std::string GetEnhancedBookmarksExtensionIdFromFinch() {
95 return chrome_variations::GetVariationParamValue(kFieldTrialName, "id"); 92 return chrome_variations::GetVariationParamValue(kFieldTrialName, "id");
96 } 93 }
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