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

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

Issue 396033002: Support "always allow" for runtime script execution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 // Gets the active permission set for the specified extension. This may 394 // Gets the active permission set for the specified extension. This may
395 // differ from the permissions in the manifest due to the optional 395 // differ from the permissions in the manifest due to the optional
396 // permissions API. This passes ownership of the set to the caller. 396 // permissions API. This passes ownership of the set to the caller.
397 PermissionSet* GetActivePermissions(const std::string& extension_id); 397 PermissionSet* GetActivePermissions(const std::string& extension_id);
398 398
399 // Sets the active |permissions| for the extension with |extension_id|. 399 // Sets the active |permissions| for the extension with |extension_id|.
400 void SetActivePermissions(const std::string& extension_id, 400 void SetActivePermissions(const std::string& extension_id,
401 const PermissionSet* permissions); 401 const PermissionSet* permissions);
402 402
403 bool GetPersistedPermissions(const std::string& extension_id,
404 URLPatternSet* persisted_permissions);
405
406 void AddPersistedPermission(const Extension* extension,
407 const URLPattern* pattern);
408
409 void ClearPersistedPermissions(const Extension* extension);
410
403 // Records whether or not this extension is currently running. 411 // Records whether or not this extension is currently running.
404 void SetExtensionRunning(const std::string& extension_id, bool is_running); 412 void SetExtensionRunning(const std::string& extension_id, bool is_running);
405 413
406 // Returns whether or not this extension is marked as running. This is used to 414 // Returns whether or not this extension is marked as running. This is used to
407 // restart apps across browser restarts. 415 // restart apps across browser restarts.
408 bool IsExtensionRunning(const std::string& extension_id); 416 bool IsExtensionRunning(const std::string& extension_id);
409 417
410 // Set/Get whether or not the app is active. Used to force a launch of apps 418 // Set/Get whether or not the app is active. Used to force a launch of apps
411 // that don't handle onRestarted() on a restart. We can only safely do that if 419 // that don't handle onRestarted() on a restart. We can only safely do that if
412 // the app was active when it was last running. 420 // the app was active when it was last running.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 bool extensions_disabled_; 720 bool extensions_disabled_;
713 721
714 ObserverList<ExtensionPrefsObserver> observer_list_; 722 ObserverList<ExtensionPrefsObserver> observer_list_;
715 723
716 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 724 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
717 }; 725 };
718 726
719 } // namespace extensions 727 } // namespace extensions
720 728
721 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 729 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698