| 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_CHROMEOS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/extension_garbage_collector.h" | 8 #include "chrome/browser/extensions/extension_garbage_collector.h" |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Enable or disable garbage collection. See |disable_garbage_collection_|. | 23 // Enable or disable garbage collection. See |disable_garbage_collection_|. |
| 24 void disable_garbage_collection() { disable_garbage_collection_ = true; } | 24 void disable_garbage_collection() { disable_garbage_collection_ = true; } |
| 25 void enable_garbage_collection() { disable_garbage_collection_ = false; } | 25 void enable_garbage_collection() { disable_garbage_collection_ = false; } |
| 26 | 26 |
| 27 // Clear shared_extensions_garbage_collected_ to initiate more than one | 27 // Clear shared_extensions_garbage_collected_ to initiate more than one |
| 28 // GC in the same process for testing. | 28 // GC in the same process for testing. |
| 29 static void ClearGarbageCollectedForTesting(); | 29 static void ClearGarbageCollectedForTesting(); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // Overriddes for ExtensionGarbageCollector: | 32 // Overriddes for ExtensionGarbageCollector: |
| 33 virtual void GarbageCollectExtensions() OVERRIDE; | 33 virtual void GarbageCollectExtensions() override; |
| 34 | 34 |
| 35 // Return true if there is no extension installation for all active profiles. | 35 // Return true if there is no extension installation for all active profiles. |
| 36 bool CanGarbageCollectSharedExtensions(); | 36 bool CanGarbageCollectSharedExtensions(); |
| 37 | 37 |
| 38 // Do GC for shared extensions dir. | 38 // Do GC for shared extensions dir. |
| 39 void GarbageCollectSharedExtensions(); | 39 void GarbageCollectSharedExtensions(); |
| 40 | 40 |
| 41 // TODO(rkc): HACK alert - this is only in place to allow the | 41 // TODO(rkc): HACK alert - this is only in place to allow the |
| 42 // kiosk_mode_screensaver to prevent its extension from getting garbage | 42 // kiosk_mode_screensaver to prevent its extension from getting garbage |
| 43 // collected. Remove this once KioskModeScreensaver is removed. | 43 // collected. Remove this once KioskModeScreensaver is removed. |
| 44 // See crbug.com/280363 | 44 // See crbug.com/280363 |
| 45 bool disable_garbage_collection_; | 45 bool disable_garbage_collection_; |
| 46 | 46 |
| 47 // Shared extensions need to be processed only once but instances of this | 47 // Shared extensions need to be processed only once but instances of this |
| 48 // class are created per-profile so this static variable prevents multiple | 48 // class are created per-profile so this static variable prevents multiple |
| 49 // processing. | 49 // processing. |
| 50 static bool shared_extensions_garbage_collected_; | 50 static bool shared_extensions_garbage_collected_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(ExtensionGarbageCollectorChromeOS); | 52 DISALLOW_COPY_AND_ASSIGN(ExtensionGarbageCollectorChromeOS); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace extensions | 55 } // namespace extensions |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_CHROMEOS_H_ | 57 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_GARBAGE_COLLECTOR_CHROMEOS_H_ |
| OLD | NEW |