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

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

Issue 10399069: Reland 137540 - Disable off-store extension installs by default. Also get rid of ExtensionService::… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
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 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 static const char* kLocalExtensionSettingsDirectoryName; 161 static const char* kLocalExtensionSettingsDirectoryName;
162 162
163 // The name of the directory inside the profile where per-app synced settings 163 // The name of the directory inside the profile where per-app synced settings
164 // are stored. 164 // are stored.
165 static const char* kSyncAppSettingsDirectoryName; 165 static const char* kSyncAppSettingsDirectoryName;
166 166
167 // The name of the directory inside the profile where per-extension synced 167 // The name of the directory inside the profile where per-extension synced
168 // settings are stored. 168 // settings are stored.
169 static const char* kSyncExtensionSettingsDirectoryName; 169 static const char* kSyncExtensionSettingsDirectoryName;
170 170
171 // Determine if a given extension download should be treated as if it came
172 // from the gallery. Note that this is requires *both* that the download_url
173 // match and that the download was referred from a gallery page.
174 bool IsDownloadFromGallery(const GURL& download_url,
175 const GURL& referrer_url);
176
177 // Returns the Extension of hosted or packaged apps, NULL otherwise. 171 // Returns the Extension of hosted or packaged apps, NULL otherwise.
178 const Extension* GetInstalledApp(const GURL& url); 172 const Extension* GetInstalledApp(const GURL& url);
179 173
180 // Returns whether the URL is from either a hosted or packaged app. 174 // Returns whether the URL is from either a hosted or packaged app.
181 bool IsInstalledApp(const GURL& url); 175 bool IsInstalledApp(const GURL& url);
182 176
183 // Associates a renderer process with the given installed app. 177 // Associates a renderer process with the given installed app.
184 void SetInstalledAppForRenderer(int renderer_child_id, const Extension* app); 178 void SetInstalledAppForRenderer(int renderer_child_id, const Extension* app);
185 179
186 // If the renderer is hosting an installed app, returns it, otherwise returns 180 // If the renderer is hosting an installed app, returns it, otherwise returns
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // Called only by testing. 360 // Called only by testing.
367 void ReloadExtensions(); 361 void ReloadExtensions();
368 362
369 // Scan the extension directory and clean up the cruft. 363 // Scan the extension directory and clean up the cruft.
370 void GarbageCollectExtensions(); 364 void GarbageCollectExtensions();
371 365
372 // Notifies Sync (if needed) of a newly-installed extension or a change to 366 // Notifies Sync (if needed) of a newly-installed extension or a change to
373 // an existing extension. 367 // an existing extension.
374 virtual void SyncExtensionChangeIfNeeded(const Extension& extension) OVERRIDE; 368 virtual void SyncExtensionChangeIfNeeded(const Extension& extension) OVERRIDE;
375 369
376 // The App that represents the web store.
377 const Extension* GetWebStoreApp();
378
379 // Returns true if |url| should get extension api bindings and be permitted 370 // Returns true if |url| should get extension api bindings and be permitted
380 // to make api calls. Note that this is independent of what extension 371 // to make api calls. Note that this is independent of what extension
381 // permissions the given extension has been granted. 372 // permissions the given extension has been granted.
382 bool ExtensionBindingsAllowed(const GURL& url); 373 bool ExtensionBindingsAllowed(const GURL& url);
383 374
384 // Returns the icon to display in the omnibox for the given extension. 375 // Returns the icon to display in the omnibox for the given extension.
385 const SkBitmap& GetOmniboxIcon(const std::string& extension_id); 376 const SkBitmap& GetOmniboxIcon(const std::string& extension_id);
386 377
387 // Returns the icon to display in the omnibox popup window for the given 378 // Returns the icon to display in the omnibox popup window for the given
388 // extension. 379 // extension.
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 scoped_ptr<ExtensionGlobalError> extension_global_error_; 837 scoped_ptr<ExtensionGlobalError> extension_global_error_;
847 838
848 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 839 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
849 InstallAppsWithUnlimtedStorage); 840 InstallAppsWithUnlimtedStorage);
850 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 841 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
851 InstallAppsAndCheckStorageProtection); 842 InstallAppsAndCheckStorageProtection);
852 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 843 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
853 }; 844 };
854 845
855 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 846 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698