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

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

Issue 2054773002: Replace the WAS_INSTALLED_BY_CUSTODIAN creation flag with a pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to code review by treib@ Created 4 years, 6 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 <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 402
403 // Returns true if the user has chosen to allow this extension to inject 403 // Returns true if the user has chosen to allow this extension to inject
404 // scripts into pages with file URLs. 404 // scripts into pages with file URLs.
405 // 405 //
406 // IMPORTANT: you probably want to use extensions::util::AllowFileAccess 406 // IMPORTANT: you probably want to use extensions::util::AllowFileAccess
407 // instead of this method. 407 // instead of this method.
408 bool AllowFileAccess(const std::string& extension_id) const; 408 bool AllowFileAccess(const std::string& extension_id) const;
409 void SetAllowFileAccess(const std::string& extension_id, bool allow); 409 void SetAllowFileAccess(const std::string& extension_id, bool allow);
410 bool HasAllowFileAccessSetting(const std::string& extension_id) const; 410 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
411 411
412 // Returns true if this extension has been installed by the custodian of
413 // a supervised user. It is relevant for supervised users and used to block
Marc Treib 2016/06/13 12:17:09 nitty nit: only one space after "."
mamir 2016/06/13 14:15:57 Done.
414 // them from uninstalling the extension for example.
415 bool WasInstalledByCustodian(const std::string& extension_id) const;
416 void SetWasInstalledByCustodian(const std::string& extension_id,
417 bool installed_by_custodian);
418
412 // Saves ExtensionInfo for each installed extension with the path to the 419 // Saves ExtensionInfo for each installed extension with the path to the
413 // version directory and the location. Blacklisted extensions won't be saved 420 // version directory and the location. Blacklisted extensions won't be saved
414 // and neither will external extensions the user has explicitly uninstalled. 421 // and neither will external extensions the user has explicitly uninstalled.
415 // Caller takes ownership of returned structure. 422 // Caller takes ownership of returned structure.
416 std::unique_ptr<ExtensionsInfo> GetInstalledExtensionsInfo() const; 423 std::unique_ptr<ExtensionsInfo> GetInstalledExtensionsInfo() const;
417 424
418 // Same as above, but only includes external extensions the user has 425 // Same as above, but only includes external extensions the user has
419 // explicitly uninstalled. 426 // explicitly uninstalled.
420 std::unique_ptr<ExtensionsInfo> GetUninstalledExtensionsInfo() const; 427 std::unique_ptr<ExtensionsInfo> GetUninstalledExtensionsInfo() const;
421 428
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 bool extensions_disabled_; 694 bool extensions_disabled_;
688 695
689 base::ObserverList<ExtensionPrefsObserver> observer_list_; 696 base::ObserverList<ExtensionPrefsObserver> observer_list_;
690 697
691 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 698 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
692 }; 699 };
693 700
694 } // namespace extensions 701 } // namespace extensions
695 702
696 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ 703 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698