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 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 7 years, 12 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
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 274
275 void NewTabUI::InitializeCSSCaches() { 275 void NewTabUI::InitializeCSSCaches() {
276 #if defined(ENABLE_THEMES) 276 #if defined(ENABLE_THEMES)
277 Profile* profile = GetProfile(); 277 Profile* profile = GetProfile();
278 ThemeSource* theme = new ThemeSource(profile); 278 ThemeSource* theme = new ThemeSource(profile);
279 ChromeURLDataManager::AddDataSource(profile, theme); 279 ChromeURLDataManager::AddDataSource(profile, theme);
280 #endif 280 #endif
281 } 281 }
282 282
283 // static 283 // static
284 void NewTabUI::RegisterUserPrefs(PrefService* prefs) { 284 void NewTabUI::RegisterUserPrefs(PrefServiceSyncable* prefs) {
285 #if !defined(OS_ANDROID) 285 #if !defined(OS_ANDROID)
286 AppLauncherHandler::RegisterUserPrefs(prefs); 286 AppLauncherHandler::RegisterUserPrefs(prefs);
287 NewTabPageHandler::RegisterUserPrefs(prefs); 287 NewTabPageHandler::RegisterUserPrefs(prefs);
288 if (NewTabUI::IsDiscoveryInNTPEnabled()) 288 if (NewTabUI::IsDiscoveryInNTPEnabled())
289 SuggestionsHandler::RegisterUserPrefs(prefs); 289 SuggestionsHandler::RegisterUserPrefs(prefs);
290 #endif 290 #endif
291 MostVisitedHandler::RegisterUserPrefs(prefs); 291 MostVisitedHandler::RegisterUserPrefs(prefs);
292 browser_sync::ForeignSessionHandler::RegisterUserPrefs(prefs); 292 browser_sync::ForeignSessionHandler::RegisterUserPrefs(prefs);
293 } 293 }
294 294
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource, 420 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource,
421 const char* mime_type, 421 const char* mime_type,
422 int resource_id) { 422 int resource_id) {
423 DCHECK(resource); 423 DCHECK(resource);
424 DCHECK(mime_type); 424 DCHECK(mime_type);
425 resource_map_[std::string(resource)] = 425 resource_map_[std::string(resource)] =
426 std::make_pair(std::string(mime_type), resource_id); 426 std::make_pair(std::string(mime_type), resource_id);
427 } 427 }
428 428
429 NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {} 429 NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/suggestions_page_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698