OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
17 #include "base/threading/thread_restrictions.h" | 17 #include "base/threading/thread_restrictions.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.h" |
20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
21 #include "chrome/browser/chrome_notification_types.h" | 21 #include "chrome/browser/chrome_notification_types.h" |
22 #include "chrome/browser/content_settings/content_settings_internal_extension_pr
ovider.h" | 22 #include "chrome/browser/content_settings/content_settings_internal_extension_pr
ovider.h" |
(...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 } | 2582 } |
2583 | 2583 |
2584 void ExtensionService::OnProfileDestructionStarted() { | 2584 void ExtensionService::OnProfileDestructionStarted() { |
2585 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2585 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
2586 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2586 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
2587 it != ids_to_unload.end(); | 2587 it != ids_to_unload.end(); |
2588 ++it) { | 2588 ++it) { |
2589 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2589 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
2590 } | 2590 } |
2591 } | 2591 } |
OLD | NEW |