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

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

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. Created 7 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 | 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 "chrome/browser/ui/webui/ntp/new_tab_ui.h" 5 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "apps/app_launcher.h" 9 #include "apps/app_launcher.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 return Profile::FromWebUI(web_ui()); 302 return Profile::FromWebUI(web_ui());
303 } 303 }
304 304
305 /////////////////////////////////////////////////////////////////////////////// 305 ///////////////////////////////////////////////////////////////////////////////
306 // NewTabHTMLSource 306 // NewTabHTMLSource
307 307
308 NewTabUI::NewTabHTMLSource::NewTabHTMLSource(Profile* profile) 308 NewTabUI::NewTabHTMLSource::NewTabHTMLSource(Profile* profile)
309 : profile_(profile) { 309 : profile_(profile) {
310 } 310 }
311 311
312 std::string NewTabUI::NewTabHTMLSource::GetSource() { 312 std::string NewTabUI::NewTabHTMLSource::GetSource() const {
313 return chrome::kChromeUINewTabHost; 313 return chrome::kChromeUINewTabHost;
314 } 314 }
315 315
316 void NewTabUI::NewTabHTMLSource::StartDataRequest( 316 void NewTabUI::NewTabHTMLSource::StartDataRequest(
317 const std::string& path, 317 const std::string& path,
318 bool is_incognito, 318 bool is_incognito,
319 const content::URLDataSource::GotDataCallback& callback) { 319 const content::URLDataSource::GotDataCallback& callback) {
320 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 320 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
321 321
322 std::map<std::string, std::pair<std::string, int> >::iterator it = 322 std::map<std::string, std::pair<std::string, int> >::iterator it =
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource, 372 void NewTabUI::NewTabHTMLSource::AddResource(const char* resource,
373 const char* mime_type, 373 const char* mime_type,
374 int resource_id) { 374 int resource_id) {
375 DCHECK(resource); 375 DCHECK(resource);
376 DCHECK(mime_type); 376 DCHECK(mime_type);
377 resource_map_[std::string(resource)] = 377 resource_map_[std::string(resource)] =
378 std::make_pair(std::string(mime_type), resource_id); 378 std::make_pair(std::string(mime_type), resource_id);
379 } 379 }
380 380
381 NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {} 381 NewTabUI::NewTabHTMLSource::~NewTabHTMLSource() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_ui.h ('k') | chrome/browser/ui/webui/ntp/thumbnail_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698