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

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

Issue 7574017: Make extension file URL access opt-in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 // Returns true if the user enabled this extension to be loaded in incognito 201 // Returns true if the user enabled this extension to be loaded in incognito
202 // mode. 202 // mode.
203 bool IsIncognitoEnabled(const std::string& extension_id); 203 bool IsIncognitoEnabled(const std::string& extension_id);
204 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 204 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
205 205
206 // Returns true if the user has chosen to allow this extension to inject 206 // Returns true if the user has chosen to allow this extension to inject
207 // scripts into pages with file URLs. 207 // scripts into pages with file URLs.
208 bool AllowFileAccess(const std::string& extension_id); 208 bool AllowFileAccess(const std::string& extension_id);
209 void SetAllowFileAccess(const std::string& extension_id, bool allow); 209 void SetAllowFileAccess(const std::string& extension_id, bool allow);
210 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
211 210
212 // Get the launch type preference. If no preference is set, return 211 // Get the launch type preference. If no preference is set, return
213 // |default_pref_value|. 212 // |default_pref_value|.
214 LaunchType GetLaunchType(const std::string& extension_id, 213 LaunchType GetLaunchType(const std::string& extension_id,
215 LaunchType default_pref_value); 214 LaunchType default_pref_value);
216 215
217 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 216 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
218 217
219 // Find the right launch container based on the launch type. 218 // Find the right launch container based on the launch type.
220 // If |extension|'s prefs do not have a launch type set, then 219 // If |extension|'s prefs do not have a launch type set, then
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 479
481 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; 480 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_;
482 481
483 // The URLs of all of the toolstrips. 482 // The URLs of all of the toolstrips.
484 URLList shelf_order_; 483 URLList shelf_order_;
485 484
486 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 485 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
487 }; 486 };
488 487
489 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 488 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698