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

Side by Side Diff: chrome/browser/icon_loader_linux.cc

Issue 8523008: base::Bind() chrome/browser/icon_loader*.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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/icon_loader.cc ('k') | chrome/browser/icon_loader_mac.mm » ('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) 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 "chrome/browser/icon_loader.h" 5 #include "chrome/browser/icon_loader.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h"
9 #include "base/file_util.h" 10 #include "base/file_util.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/message_loop.h" 12 #include "base/message_loop.h"
12 #include "base/nix/mime_util_xdg.h" 13 #include "base/nix/mime_util_xdg.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "webkit/glue/image_decoder.h" 15 #include "webkit/glue/image_decoder.h"
15 16
16 using std::string; 17 using std::string;
17 18
18 void IconLoader::ReadIcon() { 19 void IconLoader::ReadIcon() {
(...skipping 23 matching lines...) Expand all
42 icon_data.length()); 43 icon_data.length());
43 if (!bitmap->empty()) { 44 if (!bitmap->empty()) {
44 DCHECK_EQ(size_pixels, bitmap->width()); 45 DCHECK_EQ(size_pixels, bitmap->width());
45 DCHECK_EQ(size_pixels, bitmap->height()); 46 DCHECK_EQ(size_pixels, bitmap->height());
46 image_.reset(new gfx::Image(bitmap.release())); 47 image_.reset(new gfx::Image(bitmap.release()));
47 } else { 48 } else {
48 LOG(WARNING) << "Unsupported file type or load error: " << filename.value(); 49 LOG(WARNING) << "Unsupported file type or load error: " << filename.value();
49 } 50 }
50 51
51 target_message_loop_->PostTask( 52 target_message_loop_->PostTask(
52 FROM_HERE, NewRunnableMethod(this, &IconLoader::NotifyDelegate)); 53 FROM_HERE, base::Bind(&IconLoader::NotifyDelegate, this));
53 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/icon_loader.cc ('k') | chrome/browser/icon_loader_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698