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

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

Issue 218683011: Remove ExtensionService::[Get|Is]InstalledApp() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ces_get_installed_ext_by_url
Patch Set: Latest master Created 6 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 }; 124 };
125 125
126 // Manages installed and running Chromium extensions. An instance is shared 126 // Manages installed and running Chromium extensions. An instance is shared
127 // between normal and incognito profiles. 127 // between normal and incognito profiles.
128 class ExtensionService 128 class ExtensionService
129 : public ExtensionServiceInterface, 129 : public ExtensionServiceInterface,
130 public extensions::ExternalProviderInterface::VisitorInterface, 130 public extensions::ExternalProviderInterface::VisitorInterface,
131 public content::NotificationObserver, 131 public content::NotificationObserver,
132 public extensions::Blacklist::Observer { 132 public extensions::Blacklist::Observer {
133 public: 133 public:
134 // Returns the Extension of hosted or packaged apps, NULL otherwise.
135 const extensions::Extension* GetInstalledApp(const GURL& url) const;
136
137 // Returns whether the URL is from either a hosted or packaged app.
138 bool IsInstalledApp(const GURL& url) const;
139
140 // Attempts to uninstall an extension from a given ExtensionService. Returns 134 // Attempts to uninstall an extension from a given ExtensionService. Returns
141 // true iff the target extension exists. 135 // true iff the target extension exists.
142 static bool UninstallExtensionHelper(ExtensionService* extensions_service, 136 static bool UninstallExtensionHelper(ExtensionService* extensions_service,
143 const std::string& extension_id); 137 const std::string& extension_id);
144 138
145 // Constructor stores pointers to |profile| and |extension_prefs| but 139 // Constructor stores pointers to |profile| and |extension_prefs| but
146 // ownership remains at caller. 140 // ownership remains at caller.
147 ExtensionService(Profile* profile, 141 ExtensionService(Profile* profile,
148 const base::CommandLine* command_line, 142 const base::CommandLine* command_line,
149 const base::FilePath& install_directory, 143 const base::FilePath& install_directory,
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 757 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
764 GreylistedExtensionDisabled); 758 GreylistedExtensionDisabled);
765 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 759 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
766 GreylistDontEnableManuallyDisabled); 760 GreylistDontEnableManuallyDisabled);
767 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 761 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
768 GreylistUnknownDontChange); 762 GreylistUnknownDontChange);
769 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 763 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
770 }; 764 };
771 765
772 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 766 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698