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

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

Issue 8296017: Revert 105659 - Delay network requests on startup if any webRequest or webNavigation extensions a... (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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // mode. 232 // mode.
233 bool IsIncognitoEnabled(const std::string& extension_id); 233 bool IsIncognitoEnabled(const std::string& extension_id);
234 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 234 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
235 235
236 // Returns true if the user has chosen to allow this extension to inject 236 // Returns true if the user has chosen to allow this extension to inject
237 // scripts into pages with file URLs. 237 // scripts into pages with file URLs.
238 bool AllowFileAccess(const std::string& extension_id); 238 bool AllowFileAccess(const std::string& extension_id);
239 void SetAllowFileAccess(const std::string& extension_id, bool allow); 239 void SetAllowFileAccess(const std::string& extension_id, bool allow);
240 bool HasAllowFileAccessSetting(const std::string& extension_id) const; 240 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
241 241
242 // Sets the extension preference indicating that an extension wants to delay
243 // network requests on browser startup.
244 void SetDelaysNetworkRequests(const std::string& extension_id,
245 bool does_delay);
246
247 // Returns true if an extension has registered to delay network requests on
248 // browser startup.
249 bool DelaysNetworkRequests(const std::string& extension_id);
250
251 // Get the launch type preference. If no preference is set, return 242 // Get the launch type preference. If no preference is set, return
252 // |default_pref_value|. 243 // |default_pref_value|.
253 LaunchType GetLaunchType(const std::string& extension_id, 244 LaunchType GetLaunchType(const std::string& extension_id,
254 LaunchType default_pref_value); 245 LaunchType default_pref_value);
255 246
256 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 247 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
257 248
258 // Find the right launch container based on the launch type. 249 // Find the right launch container based on the launch type.
259 // If |extension|'s prefs do not have a launch type set, then 250 // If |extension|'s prefs do not have a launch type set, then
260 // use |default_pref_value|. 251 // use |default_pref_value|.
261 extension_misc::LaunchContainer GetLaunchContainer( 252 extension_misc::LaunchContainer GetLaunchContainer(
262 const Extension* extension, 253 const Extension* extension,
263 LaunchType default_pref_value); 254 LaunchType default_pref_value);
264 255
256
265 // Saves ExtensionInfo for each installed extension with the path to the 257 // Saves ExtensionInfo for each installed extension with the path to the
266 // version directory and the location. Blacklisted extensions won't be saved 258 // version directory and the location. Blacklisted extensions won't be saved
267 // and neither will external extensions the user has explicitly uninstalled. 259 // and neither will external extensions the user has explicitly uninstalled.
268 // Caller takes ownership of returned structure. 260 // Caller takes ownership of returned structure.
269 ExtensionsInfo* GetInstalledExtensionsInfo(); 261 ExtensionsInfo* GetInstalledExtensionsInfo();
270 262
271 // Returns the ExtensionInfo from the prefs for the given extension. If the 263 // Returns the ExtensionInfo from the prefs for the given extension. If the
272 // extension is not present, NULL is returned. 264 // extension is not present, NULL is returned.
273 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id); 265 ExtensionInfo* GetInstalledExtensionInfo(const std::string& extension_id);
274 266
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 519
528 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; 520 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_;
529 521
530 // The URLs of all of the toolstrips. 522 // The URLs of all of the toolstrips.
531 URLList shelf_order_; 523 URLList shelf_order_;
532 524
533 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 525 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
534 }; 526 };
535 527
536 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 528 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698