diff options
Diffstat (limited to 'chrome/browser/icon_loader.cc')
| -rw-r--r-- | chrome/browser/icon_loader.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/icon_loader.cc b/chrome/browser/icon_loader.cc index 2281b89..ea22b69 100644 --- a/chrome/browser/icon_loader.cc +++ b/chrome/browser/icon_loader.cc @@ -1,12 +1,10 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/icon_loader.h" -#include "base/message_loop.h" -#include "base/thread.h" -#include "chrome/browser/browser_process.h" +#include "chrome/browser/browser_thread.h" #include "third_party/skia/include/core/SkBitmap.h" #if defined(TOOLKIT_GTK) @@ -23,22 +21,21 @@ IconLoader::IconLoader(const IconGroupID& group, IconSize size, } IconLoader::~IconLoader() { - delete bitmap_; } void IconLoader::Start() { - target_message_loop_ = MessageLoop::current(); + target_message_loop_ = base::MessageLoopProxy::CreateForCurrentThread(); #if defined(TOOLKIT_GTK) // This call must happen on the UI thread before we can start loading icons. mime_util::DetectGtkTheme(); #endif - g_browser_process->file_thread()->message_loop()->PostTask(FROM_HERE, + BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, NewRunnableMethod(this, &IconLoader::ReadIcon)); } void IconLoader::NotifyDelegate() { - if (delegate_->OnBitmapLoaded(this, bitmap_)) - bitmap_ = NULL; + if (delegate_->OnBitmapLoaded(this, bitmap_.Get())) + bitmap_.Release(); } |
