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

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 9705074: Supporting command line argument to force field trials (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed some ooopss... Created 8 years, 8 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
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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 NewTabPageHandler::RegisterUserPrefs(prefs); 268 NewTabPageHandler::RegisterUserPrefs(prefs);
269 AppLauncherHandler::RegisterUserPrefs(prefs); 269 AppLauncherHandler::RegisterUserPrefs(prefs);
270 MostVisitedHandler::RegisterUserPrefs(prefs); 270 MostVisitedHandler::RegisterUserPrefs(prefs);
271 if (NewTabUI::IsSuggestionsPageEnabled()) 271 if (NewTabUI::IsSuggestionsPageEnabled())
272 SuggestionsHandler::RegisterUserPrefs(prefs); 272 SuggestionsHandler::RegisterUserPrefs(prefs);
273 } 273 }
274 274
275 // static 275 // static
276 void NewTabUI::SetupFieldTrials() { 276 void NewTabUI::SetupFieldTrials() {
277 scoped_refptr<base::FieldTrial> trial( 277 scoped_refptr<base::FieldTrial> trial(
278 new base::FieldTrial(kWebStoreLinkExperiment, 3, "Disabled", 278 base::FieldTrialList::FactoryGetFieldTrial(
279 2012, 6, 1)); 279 kWebStoreLinkExperiment, 3, "Disabled", 2012, 6, 1, NULL));
280 280
281 // Try to give the user a consistent experience, if possible. 281 // Try to give the user a consistent experience, if possible.
282 if (base::FieldTrialList::IsOneTimeRandomizationEnabled()) 282 if (base::FieldTrialList::IsOneTimeRandomizationEnabled())
283 trial->UseOneTimeRandomization(); 283 trial->UseOneTimeRandomization();
284 284
285 // 33.3% in each group. 285 // 33.3% in each group.
286 g_footer_group = trial->AppendGroup("FooterLink", 1); 286 g_footer_group = trial->AppendGroup("FooterLink", 1);
287 g_hint_group = trial->AppendGroup("PlusIcon", 1); 287 g_hint_group = trial->AppendGroup("PlusIcon", 1);
288 } 288 }
289 289
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 } 417 }
418 418
419 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource, 419 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource,
420 const char* mime_type, 420 const char* mime_type,
421 int resource_id) { 421 int resource_id) {
422 DCHECK(resource); 422 DCHECK(resource);
423 DCHECK(mime_type); 423 DCHECK(mime_type);
424 resource_map_[std::string(resource)] = 424 resource_map_[std::string(resource)] =
425 std::make_pair(std::string(mime_type), resource_id); 425 std::make_pair(std::string(mime_type), resource_id);
426 } 426 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_field_trial.cc ('k') | chrome_frame/chrome_frame_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698