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

Side by Side Diff: chrome/browser/favicon/favicon_service.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/favicon/favicon_service.h" 5 #include "chrome/browser/favicon/favicon_service.h"
6 6
7 #include "base/hash.h" 7 #include "base/hash.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "chrome/browser/favicon/favicon_types.h" 9 #include "chrome/browser/favicon/favicon_types.h"
10 #include "chrome/browser/favicon/favicon_util.h" 10 #include "chrome/browser/favicon/favicon_util.h"
(...skipping 22 matching lines...) Expand all
33 return; 33 return;
34 callback.Run(results); 34 callback.Run(results);
35 } 35 }
36 36
37 // Helper to run callback with empty results if we cannot get the history 37 // Helper to run callback with empty results if we cannot get the history
38 // service. 38 // service.
39 CancelableTaskTracker::TaskId RunWithEmptyResultAsync( 39 CancelableTaskTracker::TaskId RunWithEmptyResultAsync(
40 const FaviconService::FaviconResultsCallback& callback, 40 const FaviconService::FaviconResultsCallback& callback,
41 CancelableTaskTracker* tracker) { 41 CancelableTaskTracker* tracker) {
42 return tracker->PostTask( 42 return tracker->PostTask(
43 base::MessageLoopProxy::current(), 43 base::MessageLoopProxy::current().get(),
44 FROM_HERE, 44 FROM_HERE,
45 Bind(callback, std::vector<chrome::FaviconBitmapResult>())); 45 Bind(callback, std::vector<chrome::FaviconBitmapResult>()));
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 FaviconService::FaviconService(HistoryService* history_service) 50 FaviconService::FaviconService(HistoryService* history_service)
51 : history_service_(history_service) { 51 : history_service_(history_service) {
52 } 52 }
53 53
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 &resized_bitmap_data)) { 363 &resized_bitmap_data)) {
364 callback.Run(chrome::FaviconBitmapResult()); 364 callback.Run(chrome::FaviconBitmapResult());
365 return; 365 return;
366 } 366 }
367 367
368 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector( 368 bitmap_result.bitmap_data = base::RefCountedBytes::TakeVector(
369 &resized_bitmap_data); 369 &resized_bitmap_data);
370 callback.Run(bitmap_result); 370 callback.Run(bitmap_result);
371 } 371 }
372 372
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_install_helper.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698