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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 5730004: Rename ExtensionsService to ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 10 years 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 | « chrome/browser/dom_ui/dom_ui_factory.cc ('k') | chrome/browser/download/download_manager.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/new_tab_ui.h" 7 #include "chrome/browser/dom_ui/new_tab_ui.h"
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 PrefService* pref_service = GetProfile()->GetPrefs(); 369 PrefService* pref_service = GetProfile()->GetPrefs();
370 AddMessageHandler((new NTPLoginHandler())->Attach(this)); 370 AddMessageHandler((new NTPLoginHandler())->Attach(this));
371 AddMessageHandler((new ShownSectionsHandler(pref_service))->Attach(this)); 371 AddMessageHandler((new ShownSectionsHandler(pref_service))->Attach(this));
372 AddMessageHandler((new browser_sync::ForeignSessionHandler())-> 372 AddMessageHandler((new browser_sync::ForeignSessionHandler())->
373 Attach(this)); 373 Attach(this));
374 AddMessageHandler((new MostVisitedHandler())->Attach(this)); 374 AddMessageHandler((new MostVisitedHandler())->Attach(this));
375 AddMessageHandler((new RecentlyClosedTabsHandler())->Attach(this)); 375 AddMessageHandler((new RecentlyClosedTabsHandler())->Attach(this));
376 AddMessageHandler((new MetricsHandler())->Attach(this)); 376 AddMessageHandler((new MetricsHandler())->Attach(this));
377 if (GetProfile()->IsSyncAccessible()) 377 if (GetProfile()->IsSyncAccessible())
378 AddMessageHandler((new NewTabPageSyncHandler())->Attach(this)); 378 AddMessageHandler((new NewTabPageSyncHandler())->Attach(this));
379 ExtensionsService* service = GetProfile()->GetExtensionsService(); 379 ExtensionService* service = GetProfile()->GetExtensionService();
380 // We might not have an ExtensionsService (on ChromeOS when not logged in 380 // We might not have an ExtensionService (on ChromeOS when not logged in
381 // for example). 381 // for example).
382 if (service) 382 if (service)
383 AddMessageHandler((new AppLauncherHandler(service))->Attach(this)); 383 AddMessageHandler((new AppLauncherHandler(service))->Attach(this));
384 384
385 AddMessageHandler((new NewTabPageSetHomePageHandler())->Attach(this)); 385 AddMessageHandler((new NewTabPageSetHomePageHandler())->Attach(this));
386 AddMessageHandler((new NewTabPageClosePromoHandler())->Attach(this)); 386 AddMessageHandler((new NewTabPageClosePromoHandler())->Attach(this));
387 } 387 }
388 388
389 // Initializing the CSS and HTML can require some CPU, so do it after 389 // Initializing the CSS and HTML can require some CPU, so do it after
390 // we've hooked up the most visited handler. This allows the DB query 390 // we've hooked up the most visited handler. This allows the DB query
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 616
617 scoped_refptr<RefCountedBytes> html_bytes( 617 scoped_refptr<RefCountedBytes> html_bytes(
618 profile_->GetNTPResourceCache()->GetNewTabHTML(is_off_the_record)); 618 profile_->GetNTPResourceCache()->GetNewTabHTML(is_off_the_record));
619 619
620 SendResponse(request_id, html_bytes); 620 SendResponse(request_id, html_bytes);
621 } 621 }
622 622
623 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { 623 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const {
624 return "text/html"; 624 return "text/html";
625 } 625 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_factory.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698