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

Side by Side Diff: chrome/browser/extensions/extension_dom_ui.cc

Issue 1075006: Eliminate all UI thread decoding of extension images.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extensions/extension_dom_ui.h" 5 #include "chrome/browser/extensions/extension_dom_ui.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "net/base/file_stream.h" 9 #include "net/base/file_stream.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "chrome/browser/browser.h" 11 #include "chrome/browser/browser.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // Even when the extensions service is enabled by default, it's still 324 // Even when the extensions service is enabled by default, it's still
325 // disabled in incognito mode. 325 // disabled in incognito mode.
326 ExtensionsService* service = profile->GetExtensionsService(); 326 ExtensionsService* service = profile->GetExtensionsService();
327 if (!service) 327 if (!service)
328 return NULL; 328 return NULL;
329 329
330 Extension* extension = service->GetExtensionByURL(page_url); 330 Extension* extension = service->GetExtensionByURL(page_url);
331 if (!extension) 331 if (!extension)
332 return NULL; 332 return NULL;
333 333
334 return ReadFileData( 334 // TODO(arv): Move this off of the UI thread and onto the File thread. If
335 extension->GetIconPath(Extension::EXTENSION_ICON_BITTY).GetFilePath()); 335 // possible to do this asynchronously, use ImageLoadingTracker.
336 return ReadFileData(extension->GetIconPath(
337 Extension::EXTENSION_ICON_BITTY).GetFilePath());
336 } 338 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_disabled_infobar_delegate.cc ('k') | chrome/browser/extensions/extension_install_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698