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

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: Created 8 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
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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 NewTabPageHandler::RegisterUserPrefs(prefs); 265 NewTabPageHandler::RegisterUserPrefs(prefs);
266 AppLauncherHandler::RegisterUserPrefs(prefs); 266 AppLauncherHandler::RegisterUserPrefs(prefs);
267 MostVisitedHandler::RegisterUserPrefs(prefs); 267 MostVisitedHandler::RegisterUserPrefs(prefs);
268 if (NewTabUI::IsSuggestionsPageEnabled()) 268 if (NewTabUI::IsSuggestionsPageEnabled())
269 SuggestionsHandler::RegisterUserPrefs(prefs); 269 SuggestionsHandler::RegisterUserPrefs(prefs);
270 } 270 }
271 271
272 // static 272 // static
273 void NewTabUI::SetupFieldTrials() { 273 void NewTabUI::SetupFieldTrials() {
274 scoped_refptr<base::FieldTrial> trial( 274 scoped_refptr<base::FieldTrial> trial(
275 new base::FieldTrial(kWebStoreLinkExperiment, 3, "Disabled", 275 base::FieldTrial::CreateInstance(kWebStoreLinkExperiment, 3, "Disabled",
276 2012, 6, 1)); 276 2012, 6, 1));
277 277
278 // Try to give the user a consistent experience, if possible. 278 // Try to give the user a consistent experience, if possible.
279 if (base::FieldTrialList::IsOneTimeRandomizationEnabled()) 279 if (base::FieldTrialList::IsOneTimeRandomizationEnabled())
280 trial->UseOneTimeRandomization(); 280 trial->UseOneTimeRandomization();
281 281
282 // 33.3% in each group. 282 // 33.3% in each group.
283 g_footer_group = trial->AppendGroup("FooterLink", 1); 283 g_footer_group = trial->AppendGroup("FooterLink", 1);
284 g_hint_group = trial->AppendGroup("PlusIcon", 1); 284 g_hint_group = trial->AppendGroup("PlusIcon", 1);
285 } 285 }
286 286
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 415
416 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource, 416 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource,
417 const char* mime_type, 417 const char* mime_type,
418 int resource_id) { 418 int resource_id) {
419 DCHECK(resource); 419 DCHECK(resource);
420 DCHECK(mime_type); 420 DCHECK(mime_type);
421 resource_map_[std::string(resource)] = 421 resource_map_[std::string(resource)] =
422 std::make_pair(std::string(mime_type), resource_id); 422 std::make_pair(std::string(mime_type), resource_id);
423 } 423 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698