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

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

Issue 10986034: Track ga.js through the cache. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | net/http/infinite_cache.cc » ('j') | net/http/infinite_cache.cc » ('J')
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/chrome_browser_field_trials.h" 5 #include "chrome/browser/chrome_browser_field_trials.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 trial->UseOneTimeRandomization(); 545 trial->UseOneTimeRandomization();
546 trial->AppendGroup("V2", kVersion2Probability); 546 trial->AppendGroup("V2", kVersion2Probability);
547 } 547 }
548 548
549 void ChromeBrowserFieldTrials::SetUpInfiniteCacheFieldTrial() { 549 void ChromeBrowserFieldTrials::SetUpInfiniteCacheFieldTrial() {
550 const base::FieldTrial::Probability kDivisor = 100; 550 const base::FieldTrial::Probability kDivisor = 100;
551 551
552 #if (defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_IOS)) 552 #if (defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_IOS))
553 base::FieldTrial::Probability infinite_cache_probability = 0; 553 base::FieldTrial::Probability infinite_cache_probability = 0;
554 #else 554 #else
555 base::FieldTrial::Probability infinite_cache_probability = 1; 555 base::FieldTrial::Probability infinite_cache_probability = 100;
556 #endif 556 #endif
557 557
558 if (parsed_command_line_.HasSwitch(switches::kDisableInfiniteCache)) 558 if (parsed_command_line_.HasSwitch(switches::kDisableInfiniteCache))
559 infinite_cache_probability = 0; 559 infinite_cache_probability = 0;
560 560
561 scoped_refptr<base::FieldTrial> trial( 561 scoped_refptr<base::FieldTrial> trial(
562 base::FieldTrialList::FactoryGetFieldTrial("InfiniteCache", kDivisor, 562 base::FieldTrialList::FactoryGetFieldTrial("InfiniteCache", kDivisor,
563 "No", 2013, 12, 31, NULL)); 563 "No", 2013, 12, 31, NULL));
564 trial->UseOneTimeRandomization(); 564 trial->UseOneTimeRandomization();
565 trial->AppendGroup("Yes", infinite_cache_probability); 565 trial->AppendGroup("Yes", infinite_cache_probability);
566 trial->AppendGroup("Control", infinite_cache_probability); 566 trial->AppendGroup("Control", infinite_cache_probability);
567 } 567 }
OLDNEW
« no previous file with comments | « no previous file | net/http/infinite_cache.cc » ('j') | net/http/infinite_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698