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

Unified Diff: chrome/browser/icon_loader.cc

Issue 12211049: Removing base::ThreadRestrictions::ScopedAllowIO from icon_manager_linux.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/icon_loader.cc
diff --git a/chrome/browser/icon_loader.cc b/chrome/browser/icon_loader.cc
index 39919477640e6295c44c322b3f62171eea2c0556..1aef400978dce0681145fe493e7783006b870410 100644
--- a/chrome/browser/icon_loader.cc
+++ b/chrome/browser/icon_loader.cc
@@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "base/bind.h"
+#include "chrome/browser/icon_manager.h"
#include "content/public/browser/browser_thread.h"
#if defined(TOOLKIT_GTK)
@@ -14,10 +15,10 @@
using content::BrowserThread;
-IconLoader::IconLoader(const IconGroupID& group, IconSize size,
+IconLoader::IconLoader(const base::FilePath& file_path, IconSize size,
Delegate* delegate)
: target_message_loop_(NULL),
- group_(group),
+ file_path_(file_path),
icon_size_(size),
image_(NULL),
delegate_(delegate) {
@@ -35,7 +36,13 @@ void IconLoader::Start() {
#endif
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- base::Bind(&IconLoader::ReadIcon, this));
+ base::Bind(&IconLoader::ReadGroupAndIcon, this));
+}
+
+void IconLoader::ReadGroupAndIcon() {
+ IconGroupID group = IconManager::ReadGroupIDFromFilepath(file_path_);
+
+ ReadIcon(group);
}
void IconLoader::NotifyDelegate() {

Powered by Google App Engine
This is Rietveld 408576698