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

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

Issue 10387167: Revert 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
171 // Returns the Extension of hosted or packaged apps, NULL otherwise. 177 // Returns the Extension of hosted or packaged apps, NULL otherwise.
172 const Extension* GetInstalledApp(const GURL& url); 178 const Extension* GetInstalledApp(const GURL& url);
173 179
174 // Returns whether the URL is from either a hosted or packaged app. 180 // Returns whether the URL is from either a hosted or packaged app.
175 bool IsInstalledApp(const GURL& url); 181 bool IsInstalledApp(const GURL& url);
176 182
177 // Associates a renderer process with the given installed app. 183 // Associates a renderer process with the given installed app.
178 void SetInstalledAppForRenderer(int renderer_child_id, const Extension* app); 184 void SetInstalledAppForRenderer(int renderer_child_id, const Extension* app);
179 185
180 // If the renderer is hosting an installed app, returns it, otherwise returns 186 // If the renderer is hosting an installed app, returns it, otherwise returns
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Called only by testing. 366 // Called only by testing.
361 void ReloadExtensions(); 367 void ReloadExtensions();
362 368
363 // Scan the extension directory and clean up the cruft. 369 // Scan the extension directory and clean up the cruft.
364 void GarbageCollectExtensions(); 370 void GarbageCollectExtensions();
365 371
366 // Notifies Sync (if needed) of a newly-installed extension or a change to 372 // Notifies Sync (if needed) of a newly-installed extension or a change to
367 // an existing extension. 373 // an existing extension.
368 virtual void SyncExtensionChangeIfNeeded(const Extension& extension) OVERRIDE; 374 virtual void SyncExtensionChangeIfNeeded(const Extension& extension) OVERRIDE;
369 375
376 // The App that represents the web store.
377 const Extension* GetWebStoreApp();
378
370 // Returns true if |url| should get extension api bindings and be permitted 379 // Returns true if |url| should get extension api bindings and be permitted
371 // to make api calls. Note that this is independent of what extension 380 // to make api calls. Note that this is independent of what extension
372 // permissions the given extension has been granted. 381 // permissions the given extension has been granted.
373 bool ExtensionBindingsAllowed(const GURL& url); 382 bool ExtensionBindingsAllowed(const GURL& url);
374 383
375 // Returns the icon to display in the omnibox for the given extension. 384 // Returns the icon to display in the omnibox for the given extension.
376 const SkBitmap& GetOmniboxIcon(const std::string& extension_id); 385 const SkBitmap& GetOmniboxIcon(const std::string& extension_id);
377 386
378 // Returns the icon to display in the omnibox popup window for the given 387 // Returns the icon to display in the omnibox popup window for the given
379 // extension. 388 // extension.
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 scoped_ptr<ExtensionGlobalError> extension_global_error_; 846 scoped_ptr<ExtensionGlobalError> extension_global_error_;
838 847
839 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 848 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
840 InstallAppsWithUnlimtedStorage); 849 InstallAppsWithUnlimtedStorage);
841 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 850 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
842 InstallAppsAndCheckStorageProtection); 851 InstallAppsAndCheckStorageProtection);
843 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 852 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
844 }; 853 };
845 854
846 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 855 #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