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

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

Issue 6772022: Make <all_urls> and file:///* in permissions trigger "Allow file access" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 9 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 // Returns true if the user enabled this extension to be loaded in incognito 195 // Returns true if the user enabled this extension to be loaded in incognito
196 // mode. 196 // mode.
197 bool IsIncognitoEnabled(const std::string& extension_id); 197 bool IsIncognitoEnabled(const std::string& extension_id);
198 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 198 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
199 199
200 // Returns true if the user has chosen to allow this extension to inject 200 // Returns true if the user has chosen to allow this extension to inject
201 // scripts into pages with file URLs. 201 // scripts into pages with file URLs.
202 bool AllowFileAccess(const std::string& extension_id); 202 bool AllowFileAccess(const std::string& extension_id);
203 void SetAllowFileAccess(const std::string& extension_id, bool allow); 203 void SetAllowFileAccess(const std::string& extension_id, bool allow);
204 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
204 205
205 // Get the launch type preference. If no preference is set, return 206 // Get the launch type preference. If no preference is set, return
206 // |default_pref_value|. 207 // |default_pref_value|.
207 LaunchType GetLaunchType(const std::string& extension_id, 208 LaunchType GetLaunchType(const std::string& extension_id,
208 LaunchType default_pref_value); 209 LaunchType default_pref_value);
209 210
210 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 211 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
211 212
212 // Find the right launch container based on the launch type. 213 // Find the right launch container based on the launch type.
213 // If |extension|'s prefs do not have a launch type set, then 214 // If |extension|'s prefs do not have a launch type set, then
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // Weak pointer, owned by Profile. 434 // Weak pointer, owned by Profile.
434 ExtensionPrefValueMap* extension_pref_value_map_; 435 ExtensionPrefValueMap* extension_pref_value_map_;
435 436
436 // The URLs of all of the toolstrips. 437 // The URLs of all of the toolstrips.
437 URLList shelf_order_; 438 URLList shelf_order_;
438 439
439 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 440 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
440 }; 441 };
441 442
442 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 443 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698