OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |