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

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

Issue 7397021: Re-land r93365 - add RefCountedString (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 if (AppLauncherHandler::HandlePing(profile_, path)) { 446 if (AppLauncherHandler::HandlePing(profile_, path)) {
447 return; 447 return;
448 } else if (!path.empty() && path[0] != '#') { 448 } else if (!path.empty() && path[0] != '#') {
449 // A path under new-tab was requested; it's likely a bad relative 449 // A path under new-tab was requested; it's likely a bad relative
450 // URL from the new tab page, but in any case it's an error. 450 // URL from the new tab page, but in any case it's an error.
451 NOTREACHED() << path << " should not have been requested on the NTP"; 451 NOTREACHED() << path << " should not have been requested on the NTP";
452 return; 452 return;
453 } 453 }
454 454
455 scoped_refptr<RefCountedBytes> html_bytes( 455 scoped_refptr<RefCountedMemory> html_bytes(
456 NTPResourceCacheFactory::GetForProfile(profile_)-> 456 NTPResourceCacheFactory::GetForProfile(profile_)->
457 GetNewTabHTML(is_incognito)); 457 GetNewTabHTML(is_incognito));
458 458
459 SendResponse(request_id, html_bytes); 459 SendResponse(request_id, html_bytes);
460 } 460 }
461 461
462 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { 462 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const {
463 return "text/html"; 463 return "text/html";
464 } 464 }
465 465
466 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const { 466 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const {
467 return false; 467 return false;
468 } 468 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/net_internals_ui.cc ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698