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

Side by Side Diff: chrome/browser/extensions/external_component_loader.h

Issue 445233002: Allow enhanced bookmarks external component extensions to be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: whitelist in ExternalComponentLoader Created 6 years, 4 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "chrome/browser/extensions/external_loader.h" 11 #include "chrome/browser/extensions/external_loader.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 class Extension;
17
16 // A specialization of the ExternalLoader that loads a hard-coded list of 18 // A specialization of the ExternalLoader that loads a hard-coded list of
17 // external extensions, that should be considered components of chrome (but 19 // external extensions, that should be considered components of chrome (but
18 // unlike Component extensions, these extensions are installed from the webstore 20 // unlike Component extensions, these extensions are installed from the webstore
19 // and don't get access to component only APIs. 21 // and don't get access to component only APIs.
20 // Instances of this class are expected to be created and destroyed on the UI 22 // Instances of this class are expected to be created and destroyed on the UI
21 // thread and they are expecting public method calls from the UI thread. 23 // thread and they are expecting public method calls from the UI thread.
22 class ExternalComponentLoader : public ExternalLoader { 24 class ExternalComponentLoader : public ExternalLoader {
23 public: 25 public:
24 explicit ExternalComponentLoader(Profile* profile); 26 explicit ExternalComponentLoader(Profile* profile);
25 27
28 // True if |extension| should be modifiable by the user.
29 static bool IsModifiable(const extensions::Extension* extension);
30
26 protected: 31 protected:
27 virtual void StartLoading() OVERRIDE; 32 virtual void StartLoading() OVERRIDE;
28 33
29 private: 34 private:
30 friend class base::RefCountedThreadSafe<ExternalLoader>; 35 friend class base::RefCountedThreadSafe<ExternalLoader>;
31 virtual ~ExternalComponentLoader(); 36 virtual ~ExternalComponentLoader();
32 37
33 // The profile that this loader is associated with. It listens for 38 // The profile that this loader is associated with. It listens for
34 // preference changes for that profile. 39 // preference changes for that profile.
35 Profile* profile_; 40 Profile* profile_;
36 DISALLOW_COPY_AND_ASSIGN(ExternalComponentLoader); 41 DISALLOW_COPY_AND_ASSIGN(ExternalComponentLoader);
37 }; 42 };
38 43
39 } // namespace extensions 44 } // namespace extensions
40 45
41 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_ 46 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698