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

Side by Side Diff: chrome/browser/search/local_ntp_source.cc

Issue 14039004: Add int params to URLDataSource::StartDataRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changing struct -> ints. 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/search/local_ntp_source.h" 5 #include "chrome/browser/search/local_ntp_source.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 19 matching lines...) Expand all
30 30
31 LocalNtpSource::~LocalNtpSource() { 31 LocalNtpSource::~LocalNtpSource() {
32 } 32 }
33 33
34 std::string LocalNtpSource::GetSource() { 34 std::string LocalNtpSource::GetSource() {
35 return chrome::kChromeSearchLocalNtpHost; 35 return chrome::kChromeSearchLocalNtpHost;
36 } 36 }
37 37
38 void LocalNtpSource::StartDataRequest( 38 void LocalNtpSource::StartDataRequest(
39 const std::string& path, 39 const std::string& path,
40 bool is_incognito, 40 int render_process_id,
41 int render_view_id,
41 const content::URLDataSource::GotDataCallback& callback) { 42 const content::URLDataSource::GotDataCallback& callback) {
42 int identifier = -1; 43 int identifier = -1;
43 if (path == kHtmlFilename) { 44 if (path == kHtmlFilename) {
44 identifier = IDR_LOCAL_NTP_HTML; 45 identifier = IDR_LOCAL_NTP_HTML;
45 } else if (path == kJSFilename) { 46 } else if (path == kJSFilename) {
46 identifier = IDR_LOCAL_NTP_JS; 47 identifier = IDR_LOCAL_NTP_JS;
47 } else if (path == kCssFilename) { 48 } else if (path == kCssFilename) {
48 identifier = IDR_LOCAL_NTP_CSS; 49 identifier = IDR_LOCAL_NTP_CSS;
49 } else if (path == kCloseBarFilename) { 50 } else if (path == kCloseBarFilename) {
50 identifier = IDR_CLOSE_2; 51 identifier = IDR_CLOSE_2;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (request->url().SchemeIs(chrome::kChromeSearchScheme)) { 85 if (request->url().SchemeIs(chrome::kChromeSearchScheme)) {
85 DCHECK(StartsWithASCII(request->url().path(), "/", true)); 86 DCHECK(StartsWithASCII(request->url().path(), "/", true));
86 std::string filename = request->url().path().substr(1); 87 std::string filename = request->url().path().substr(1);
87 return filename == kHtmlFilename || filename == kJSFilename || 88 return filename == kHtmlFilename || filename == kJSFilename ||
88 filename == kCssFilename || filename == kCloseBarFilename || 89 filename == kCssFilename || filename == kCloseBarFilename ||
89 filename == kCloseBarHoverFilename || 90 filename == kCloseBarHoverFilename ||
90 filename == kCloseBarActiveFilename; 91 filename == kCloseBarActiveFilename;
91 } 92 }
92 return false; 93 return false;
93 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698