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

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

Issue 8205001: (Owner approval for) Delay network requests on startup if any webRequest ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // mode. 209 // mode.
210 bool IsIncognitoEnabled(const std::string& extension_id); 210 bool IsIncognitoEnabled(const std::string& extension_id);
211 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 211 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
212 212
213 // Returns true if the user has chosen to allow this extension to inject 213 // Returns true if the user has chosen to allow this extension to inject
214 // scripts into pages with file URLs. 214 // scripts into pages with file URLs.
215 bool AllowFileAccess(const std::string& extension_id); 215 bool AllowFileAccess(const std::string& extension_id);
216 void SetAllowFileAccess(const std::string& extension_id, bool allow); 216 void SetAllowFileAccess(const std::string& extension_id, bool allow);
217 bool HasAllowFileAccessSetting(const std::string& extension_id) const; 217 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
218 218
219 // Sets the extension preference indicating that an extension wants to delay
220 // network requests on browser startup.
221 void SetDelaysNetworkRequests(const std::string& extension_id,
222 bool does_delay);
223
224 // Returns true if an extension has registered to delay network requests on
225 // browser startup.
226 bool DelaysNetworkRequests(const std::string& extension_id);
227
219 // Get the launch type preference. If no preference is set, return 228 // Get the launch type preference. If no preference is set, return
220 // |default_pref_value|. 229 // |default_pref_value|.
221 LaunchType GetLaunchType(const std::string& extension_id, 230 LaunchType GetLaunchType(const std::string& extension_id,
222 LaunchType default_pref_value); 231 LaunchType default_pref_value);
223 232
224 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 233 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
225 234
226 // Find the right launch container based on the launch type. 235 // Find the right launch container based on the launch type.
227 // If |extension|'s prefs do not have a launch type set, then 236 // If |extension|'s prefs do not have a launch type set, then
228 // use |default_pref_value|. 237 // use |default_pref_value|.
229 extension_misc::LaunchContainer GetLaunchContainer( 238 extension_misc::LaunchContainer GetLaunchContainer(
230 const Extension* extension, 239 const Extension* extension,
231 LaunchType default_pref_value); 240 LaunchType default_pref_value);
232 241
233
234 // Saves ExtensionInfo for each installed extension with the path to the 242 // Saves ExtensionInfo for each installed extension with the path to the
235 // version directory and the location. Blacklisted extensions won't be saved 243 // version directory and the location. Blacklisted extensions won't be saved
236 // and neither will external extensions the user has explicitly uninstalled. 244 // and neither will external extensions the user has explicitly uninstalled.
237 // Caller takes ownership of returned structure. 245 // Caller takes ownership of returned structure.
238 ExtensionsInfo* GetInstalledExtensionsInfo(); 246 ExtensionsInfo* GetInstalledExtensionsInfo();
239 247
240 // Returns the ExtensionInfo from the prefs for the given extension. If the 248 // Returns the ExtensionInfo from the prefs for the given extension. If the
241 // extension is not present, NULL is returned. 249 // extension is not present, NULL is returned.
242 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); 250 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id);
243 251
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 504
497 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; 505 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_;
498 506
499 // The URLs of all of the toolstrips. 507 // The URLs of all of the toolstrips.
500 URLList shelf_order_; 508 URLList shelf_order_;
501 509
502 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 510 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
503 }; 511 };
504 512
505 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 513 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698