OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |