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

Side by Side Diff: chrome/browser/prerender/prerender_field_trial.cc

Issue 10825179: Disable the prefetching trial during the CloudPrintPolicyFlag test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc » ('j') | 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/prerender/prerender_field_trial.h" 5 #include "chrome/browser/prerender/prerender_field_trial.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (!profile) 278 if (!profile)
279 return false; 279 return false;
280 280
281 // Override any field trial groups if the user has set a command line flag. 281 // Override any field trial groups if the user has set a command line flag.
282 if (CommandLine::ForCurrentProcess()->HasSwitch( 282 if (CommandLine::ForCurrentProcess()->HasSwitch(
283 switches::kSpeculativeResourcePrefetching)) { 283 switches::kSpeculativeResourcePrefetching)) {
284 const std::string switch_value = 284 const std::string switch_value =
285 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 285 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
286 switches::kSpeculativeResourcePrefetching); 286 switches::kSpeculativeResourcePrefetching);
287 287
288 if (switch_value == switches::kSpeculativeResourcePrefetchingLearning) 288 return switch_value == switches::kSpeculativeResourcePrefetchingLearning;
289 return true;
290 } 289 }
291 290
292 const int group = FieldTrialList::FindValue( 291 const int group = FieldTrialList::FindValue(
293 kSpeculativePrefetchingLearningTrialName); 292 kSpeculativePrefetchingLearningTrialName);
294 return group == g_speculative_prefetching_learning_default_group_number; 293 return group == g_speculative_prefetching_learning_default_group_number;
295 } 294 }
296 295
297 } // namespace prerender 296 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698