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

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

Issue 220053002: Remove ExtensionService::GetInstalledExtensionByUrl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 }; 123 };
124 124
125 // Manages installed and running Chromium extensions. An instance is shared 125 // Manages installed and running Chromium extensions. An instance is shared
126 // between normal and incognito profiles. 126 // between normal and incognito profiles.
127 class ExtensionService 127 class ExtensionService
128 : public ExtensionServiceInterface, 128 : public ExtensionServiceInterface,
129 public extensions::ExternalProviderInterface::VisitorInterface, 129 public extensions::ExternalProviderInterface::VisitorInterface,
130 public content::NotificationObserver, 130 public content::NotificationObserver,
131 public extensions::Blacklist::Observer { 131 public extensions::Blacklist::Observer {
132 public: 132 public:
133 // Returns the Extension for a given url or NULL if the url doesn't belong to
134 // an installed extension. This may be a hosted app extent or a
135 // chrome-extension:// url.
136 const extensions::Extension* GetInstalledExtensionByUrl(
137 const GURL& url) const;
138
139 // Returns the Extension of hosted or packaged apps, NULL otherwise. 133 // Returns the Extension of hosted or packaged apps, NULL otherwise.
140 const extensions::Extension* GetInstalledApp(const GURL& url) const; 134 const extensions::Extension* GetInstalledApp(const GURL& url) const;
141 135
142 // Returns whether the URL is from either a hosted or packaged app. 136 // Returns whether the URL is from either a hosted or packaged app.
143 bool IsInstalledApp(const GURL& url) const; 137 bool IsInstalledApp(const GURL& url) const;
144 138
145 // Attempts to uninstall an extension from a given ExtensionService. Returns 139 // Attempts to uninstall an extension from a given ExtensionService. Returns
146 // true iff the target extension exists. 140 // true iff the target extension exists.
147 static bool UninstallExtensionHelper(ExtensionService* extensions_service, 141 static bool UninstallExtensionHelper(ExtensionService* extensions_service,
148 const std::string& extension_id); 142 const std::string& extension_id);
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 779 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
786 GreylistedExtensionDisabled); 780 GreylistedExtensionDisabled);
787 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 781 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
788 GreylistDontEnableManuallyDisabled); 782 GreylistDontEnableManuallyDisabled);
789 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 783 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
790 GreylistUnknownDontChange); 784 GreylistUnknownDontChange);
791 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 785 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
792 }; 786 };
793 787
794 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 788 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698