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

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

Issue 2790823004: Retry reinstallation of corrupted policy extensions. (Closed)
Patch Set: address comments Created 3 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
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 <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 browser_terminating_ = value; 442 browser_terminating_ = value;
443 } 443 }
444 444
445 // Set a callback to be called when all external providers are ready and their 445 // Set a callback to be called when all external providers are ready and their
446 // extensions have been installed. 446 // extensions have been installed.
447 void set_external_updates_finished_callback_for_test( 447 void set_external_updates_finished_callback_for_test(
448 const base::Closure& callback) { 448 const base::Closure& callback) {
449 external_updates_finished_callback_ = callback; 449 external_updates_finished_callback_ = callback;
450 } 450 }
451 451
452 void set_external_updates_disabled_for_test(bool value) {
453 external_updates_disabled_for_test_ = value;
454 }
455
452 private: 456 private:
453 // Loads extensions specified via a command line flag/switch. 457 // Loads extensions specified via a command line flag/switch.
454 void LoadExtensionsFromCommandLineFlag(const char* switch_name); 458 void LoadExtensionsFromCommandLineFlag(const char* switch_name);
455 459
456 // Reloads the specified extension, sending the onLaunched() event to it if it 460 // Reloads the specified extension, sending the onLaunched() event to it if it
457 // currently has any window showing. |be_noisy| determines whether noisy 461 // currently has any window showing. |be_noisy| determines whether noisy
458 // failures are allowed for unpacked extension installs. 462 // failures are allowed for unpacked extension installs.
459 void ReloadExtensionImpl(const std::string& extension_id, bool be_noisy); 463 void ReloadExtensionImpl(const std::string& extension_id, bool be_noisy);
460 464
461 // content::NotificationObserver implementation: 465 // content::NotificationObserver implementation:
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // A callback to be called when all external providers are ready and their 674 // A callback to be called when all external providers are ready and their
671 // extensions have been installed. Normally this is a null callback, but 675 // extensions have been installed. Normally this is a null callback, but
672 // is used in external provider related tests. 676 // is used in external provider related tests.
673 base::Closure external_updates_finished_callback_; 677 base::Closure external_updates_finished_callback_;
674 678
675 // Set when the browser is terminating. Prevents us from installing or 679 // Set when the browser is terminating. Prevents us from installing or
676 // updating additional extensions and allows in-progress installations to 680 // updating additional extensions and allows in-progress installations to
677 // decide to abort. 681 // decide to abort.
678 bool browser_terminating_ = false; 682 bool browser_terminating_ = false;
679 683
684 // If set, call to CheckForExternalUpdates() will bail out.
685 bool external_updates_disabled_for_test_ = false;
686
680 // Set to true if this is the first time this ExtensionService has run. 687 // Set to true if this is the first time this ExtensionService has run.
681 // Used for specially handling external extensions that are installed the 688 // Used for specially handling external extensions that are installed the
682 // first time. 689 // first time.
683 bool is_first_run_ = false; 690 bool is_first_run_ = false;
684 691
685 // Set to true if extensions are all to be blocked. 692 // Set to true if extensions are all to be blocked.
686 bool block_extensions_ = false; 693 bool block_extensions_ = false;
687 694
688 // Store the ids of reloading extensions. We use this to re-enable extensions 695 // Store the ids of reloading extensions. We use this to re-enable extensions
689 // which were disabled for a reload. 696 // which were disabled for a reload.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 GreylistUnknownDontChange); 751 GreylistUnknownDontChange);
745 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 752 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
746 ManagementPolicyProhibitsEnableOnInstalled); 753 ManagementPolicyProhibitsEnableOnInstalled);
747 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 754 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
748 BlockAndUnblockBlacklistedExtension); 755 BlockAndUnblockBlacklistedExtension);
749 756
750 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 757 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
751 }; 758 };
752 759
753 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 760 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/content_verifier_browsertest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698