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

Side by Side Diff: chrome/browser/ui/webui/fileicon_source.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
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.h ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.h » ('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) 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/fileicon_source.h" 5 #include "chrome/browser/ui/webui/fileicon_source.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 // Icon was not in cache, go fetch it slowly. 124 // Icon was not in cache, go fetch it slowly.
125 im->LoadIcon(path, 125 im->LoadIcon(path,
126 icon_size, 126 icon_size,
127 base::Bind(&FileIconSource::OnFileIconDataAvailable, 127 base::Bind(&FileIconSource::OnFileIconDataAvailable,
128 base::Unretained(this), details), 128 base::Unretained(this), details),
129 &cancelable_task_tracker_); 129 &cancelable_task_tracker_);
130 } 130 }
131 } 131 }
132 132
133 std::string FileIconSource::GetSource() { 133 std::string FileIconSource::GetSource() const {
134 return kFileIconPath; 134 return kFileIconPath;
135 } 135 }
136 136
137 void FileIconSource::StartDataRequest( 137 void FileIconSource::StartDataRequest(
138 const std::string& url_path, 138 const std::string& url_path,
139 bool is_incognito, 139 bool is_incognito,
140 const content::URLDataSource::GotDataCallback& callback) { 140 const content::URLDataSource::GotDataCallback& callback) {
141 std::string query; 141 std::string query;
142 base::FilePath file_path; 142 base::FilePath file_path;
143 ui::ScaleFactor scale_factor; 143 ui::ScaleFactor scale_factor;
(...skipping 17 matching lines...) Expand all
161 .sk_bitmap(), 161 .sk_bitmap(),
162 false, 162 false,
163 &icon_data->data()); 163 &icon_data->data());
164 164
165 details.callback.Run(icon_data); 165 details.callback.Run(icon_data);
166 } else { 166 } else {
167 // TODO(glen): send a dummy icon. 167 // TODO(glen): send a dummy icon.
168 details.callback.Run(NULL); 168 details.callback.Run(NULL);
169 } 169 }
170 } 170 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.h ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698