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

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

Issue 695133005: Temporarily disable extensions and sync while a profile is locked - Profiles Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test. Don't lock policy-forced extensions. Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // cannot be disabled, does nothing. 288 // cannot be disabled, does nothing.
289 virtual void DisableExtension( 289 virtual void DisableExtension(
290 const std::string& extension_id, 290 const std::string& extension_id,
291 extensions::Extension::DisableReason disable_reason); 291 extensions::Extension::DisableReason disable_reason);
292 292
293 // Disable non-default and non-managed extensions with ids not in 293 // Disable non-default and non-managed extensions with ids not in
294 // |except_ids|. Default extensions are those from the Web Store with 294 // |except_ids|. Default extensions are those from the Web Store with
295 // |was_installed_by_default| flag. 295 // |was_installed_by_default| flag.
296 void DisableUserExtensions(const std::vector<std::string>& except_ids); 296 void DisableUserExtensions(const std::vector<std::string>& except_ids);
297 297
298 // Extensions specified by |extension_ids| should become locked. Extensions
not at google - send to devlin 2014/11/12 18:23:00 You might want to mention that "locking" does impl
Mike Lerman 2014/11/12 20:58:42 Done.
299 // are no longer considered enabled or disabled. Blacklisted extensions are
300 // now considered both blacklisted and locked.
301 void LockAllExtensions();
302
303 // All locked extensions should revert to being either enabled or disabled
304 // as appropriate.
305 void UnlockAllLockedExtensions();
306
298 // Updates the |extension|'s granted permissions lists to include all 307 // Updates the |extension|'s granted permissions lists to include all
299 // permissions in the |extension|'s manifest and re-enables the 308 // permissions in the |extension|'s manifest and re-enables the
300 // extension. 309 // extension.
301 void GrantPermissionsAndEnableExtension( 310 void GrantPermissionsAndEnableExtension(
302 const extensions::Extension* extension); 311 const extensions::Extension* extension);
303 312
304 // Updates the |extension|'s granted permissions lists to include all 313 // Updates the |extension|'s granted permissions lists to include all
305 // permissions in the |extensions|'s manifest. 314 // permissions in the |extensions|'s manifest.
306 void GrantPermissions(const extensions::Extension* extension); 315 void GrantPermissions(const extensions::Extension* extension);
307 316
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 GreylistedExtensionDisabled); 742 GreylistedExtensionDisabled);
734 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 743 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
735 GreylistDontEnableManuallyDisabled); 744 GreylistDontEnableManuallyDisabled);
736 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 745 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
737 GreylistUnknownDontChange); 746 GreylistUnknownDontChange);
738 747
739 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 748 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
740 }; 749 };
741 750
742 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 751 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698