| 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 #ifndef CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_ |
| 6 #define CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_ | 6 #define CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ~PowerSaveBlockResourceThrottle() override; | 22 ~PowerSaveBlockResourceThrottle() override; |
| 23 | 23 |
| 24 // ResourceThrottle overrides: | 24 // ResourceThrottle overrides: |
| 25 void WillStartRequest(bool* defer) override; | 25 void WillStartRequest(bool* defer) override; |
| 26 void WillProcessResponse(bool* defer) override; | 26 void WillProcessResponse(bool* defer) override; |
| 27 const char* GetNameForLogging() const override; | 27 const char* GetNameForLogging() const override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 void ActivatePowerSaveBlocker(); | 30 void ActivatePowerSaveBlocker(); |
| 31 | 31 |
| 32 base::OneShotTimer<PowerSaveBlockResourceThrottle> timer_; | 32 base::OneShotTimer timer_; |
| 33 scoped_ptr<PowerSaveBlocker> power_save_blocker_; | 33 scoped_ptr<PowerSaveBlocker> power_save_blocker_; |
| 34 | 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockResourceThrottle); | 35 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockResourceThrottle); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace content | 38 } // namespace content |
| 39 | 39 |
| 40 #endif // CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_ | 40 #endif // CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_ |
| OLD | NEW |