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

Side by Side Diff: extensions/browser/component_extension_resource_manager.h

Issue 830833002: Makes GetComponentExtensionResourceManager() thread-safe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ 5 #ifndef EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
6 #define EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ 6 #define EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
7 7
8 namespace base { 8 namespace base {
9 class FilePath; 9 class FilePath;
10 } 10 }
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 // This class manages which extension resources actually come from 14 // This class manages which extension resources actually come from
15 // the resource bundle. 15 // the resource bundle.
16 class ComponentExtensionResourceManager { 16 class ComponentExtensionResourceManager {
17 public: 17 public:
18 virtual ~ComponentExtensionResourceManager() {} 18 virtual ~ComponentExtensionResourceManager() {}
19 19
20 // Checks whether image is a component extension resource. Returns false 20 // Checks whether image is a component extension resource. Returns false
21 // if a given |resource| does not have a corresponding image in bundled 21 // if a given |resource| does not have a corresponding image in bundled
22 // resources. Otherwise fills |resource_id|. This doesn't check if the 22 // resources. Otherwise fills |resource_id|. This doesn't check if the
23 // extension the resource is in is actually a component extension. 23 // extension the resource is in is actually a component extension.
24 virtual bool IsComponentExtensionResource( 24 virtual bool IsComponentExtensionResource(
25 const base::FilePath& extension_path, 25 const base::FilePath& extension_path,
26 const base::FilePath& resource_path, 26 const base::FilePath& resource_path,
27 int* resource_id) = 0; 27 int* resource_id) const = 0;
28 }; 28 };
29 29
30 } // namespace extensions 30 } // namespace extensions
31 31
32 #endif // EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ 32 #endif // EXTENSIONS_BROWSER_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698