OLD | NEW |
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 #include "chrome/browser/extensions/extension_garbage_collector.h" | 5 #include "chrome/browser/extensions/extension_garbage_collector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_enumerator.h" | 8 #include "base/files/file_enumerator.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "chrome/browser/extensions/extension_garbage_collector_factory.h" | 19 #include "chrome/browser/extensions/extension_garbage_collector_factory.h" |
20 #include "chrome/browser/extensions/extension_service.h" | 20 #include "chrome/browser/extensions/extension_service.h" |
21 #include "chrome/browser/extensions/extension_util.h" | 21 #include "chrome/browser/extensions/extension_util.h" |
22 #include "chrome/browser/extensions/install_tracker.h" | 22 #include "chrome/browser/extensions/install_tracker.h" |
23 #include "chrome/browser/extensions/pending_extension_manager.h" | 23 #include "chrome/browser/extensions/pending_extension_manager.h" |
24 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" | |
25 #include "components/crx_file/id_util.h" | 24 #include "components/crx_file/id_util.h" |
26 #include "content/public/browser/browser_context.h" | 25 #include "content/public/browser/browser_context.h" |
27 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
28 #include "content/public/browser/storage_partition.h" | 27 #include "content/public/browser/storage_partition.h" |
29 #include "extensions/browser/extension_prefs.h" | 28 #include "extensions/browser/extension_prefs.h" |
30 #include "extensions/browser/extension_registry.h" | 29 #include "extensions/browser/extension_registry.h" |
31 #include "extensions/browser/extension_system.h" | 30 #include "extensions/browser/extension_system.h" |
32 #include "extensions/common/extension.h" | 31 #include "extensions/common/extension.h" |
33 #include "extensions/common/file_util.h" | 32 #include "extensions/common/file_util.h" |
| 33 #include "extensions/common/manifest_handlers/app_isolation_info.h" |
34 #include "extensions/common/one_shot_event.h" | 34 #include "extensions/common/one_shot_event.h" |
35 | 35 |
36 namespace extensions { | 36 namespace extensions { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 // Wait this many seconds before trying to garbage collect extensions again. | 40 // Wait this many seconds before trying to garbage collect extensions again. |
41 const int kGarbageCollectRetryDelayInSeconds = 30; | 41 const int kGarbageCollectRetryDelayInSeconds = 30; |
42 | 42 |
43 // Wait this many seconds after startup to see if there are any extensions | 43 // Wait this many seconds after startup to see if there are any extensions |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // accounting. | 254 // accounting. |
255 NOTREACHED(); | 255 NOTREACHED(); |
256 | 256 |
257 // Don't let the count go negative to avoid garbage collecting when | 257 // Don't let the count go negative to avoid garbage collecting when |
258 // an install is actually in progress. | 258 // an install is actually in progress. |
259 crx_installs_in_progress_ = 0; | 259 crx_installs_in_progress_ = 0; |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 } // namespace extensions | 263 } // namespace extensions |
OLD | NEW |