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

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

Issue 2783813002: Move ChromeRequirementsChecker to //extensions as a PreloadCheck (Closed)
Patch Set: rebase? 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 base::CommandLine::StringType path_list = 647 base::CommandLine::StringType path_list =
648 command_line_->GetSwitchValueNative(switch_name); 648 command_line_->GetSwitchValueNative(switch_name);
649 base::StringTokenizerT<base::CommandLine::StringType, 649 base::StringTokenizerT<base::CommandLine::StringType,
650 base::CommandLine::StringType::const_iterator> 650 base::CommandLine::StringType::const_iterator>
651 t(path_list, FILE_PATH_LITERAL(",")); 651 t(path_list, FILE_PATH_LITERAL(","));
652 while (t.GetNext()) { 652 while (t.GetNext()) {
653 std::string extension_id; 653 std::string extension_id;
654 extensions::UnpackedInstaller::Create(this)->LoadFromCommandLine( 654 extensions::UnpackedInstaller::Create(this)->LoadFromCommandLine(
655 base::FilePath(t.token()), &extension_id, false /*only-allow-apps*/); 655 base::FilePath(t.token()), &extension_id, false /*only-allow-apps*/);
656 // Extension id is added to whitelist after its extension is loaded 656 // Extension id is added to whitelist after its extension is loaded
657 // because code is executed asynchronously. 657 // because code is executed asynchronously. TODO(michaelpg): Remove this
658 // assumption so loading extensions does not have to be asynchronous:
659 // crbug.com/708354.
658 if (switch_name == switches::kDisableExtensionsExcept) 660 if (switch_name == switches::kDisableExtensionsExcept)
659 disable_flag_exempted_extensions_.insert(extension_id); 661 disable_flag_exempted_extensions_.insert(extension_id);
660 } 662 }
661 } 663 }
662 } 664 }
663 665
664 void ExtensionService::ReloadExtensionImpl( 666 void ExtensionService::ReloadExtensionImpl(
665 // "transient" because the process of reloading may cause the reference 667 // "transient" because the process of reloading may cause the reference
666 // to become invalid. Instead, use |extension_id|, a copy. 668 // to become invalid. Instead, use |extension_id|, a copy.
667 const std::string& transient_extension_id, 669 const std::string& transient_extension_id,
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 } 2561 }
2560 2562
2561 void ExtensionService::OnProfileDestructionStarted() { 2563 void ExtensionService::OnProfileDestructionStarted() {
2562 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2564 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2563 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2565 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2564 it != ids_to_unload.end(); 2566 it != ids_to_unload.end();
2565 ++it) { 2567 ++it) {
2566 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2568 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2567 } 2569 }
2568 } 2570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698