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

Side by Side Diff: chrome/browser/history/history_field_trial.cc

Issue 8677025: Reverting based on discussions on #chromium with shess and rsleevi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/history/history_field_trial.h"
6
7 #include "base/metrics/field_trial.h"
8
9 namespace history {
10
11 namespace {
12
13 int g_low_mem_trial_group = 0;
14 bool g_low_mem_trial = false;
15
16 static const char kHistoryFieldTrialName[] = "History";
17
18 } // namespace
19
20 // static
21 void HistoryFieldTrial::Activate() {
22 if (g_low_mem_trial_group)
23 return; // Already initialized.
24
25 scoped_refptr<base::FieldTrial> trial(new base::FieldTrial(
26 kHistoryFieldTrialName, 1000, "Inactive", 2012, 2, 1));
27
28 g_low_mem_trial_group = trial->AppendGroup("LowMem", 50); // 5%
29 if (trial->group() == g_low_mem_trial_group)
30 g_low_mem_trial = true;
31 }
32
33 // static
34 bool HistoryFieldTrial::IsLowMemFieldTrial() {
35 return g_low_mem_trial;
36 }
37
38 // static
39 std::string HistoryFieldTrial::GetGroupSuffix() {
40 return g_low_mem_trial ? std::string("_LowMem") : std::string();
41 }
42
43 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_field_trial.h ('k') | chrome/browser/history/in_memory_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698