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 "content/browser/loader/power_save_block_resource_throttle.h" | 5 #include "content/browser/loader/power_save_block_resource_throttle.h" |
6 | 6 |
7 #include "content/public/browser/power_save_blocker_factory.h" | 7 #include "content/public/browser/power_save_blocker_factory.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 power_save_blocker_.reset(); | 34 power_save_blocker_.reset(); |
35 timer_.Stop(); | 35 timer_.Stop(); |
36 } | 36 } |
37 | 37 |
38 const char* PowerSaveBlockResourceThrottle::GetNameForLogging() const { | 38 const char* PowerSaveBlockResourceThrottle::GetNameForLogging() const { |
39 return "PowerSaveBlockResourceThrottle"; | 39 return "PowerSaveBlockResourceThrottle"; |
40 } | 40 } |
41 | 41 |
42 void PowerSaveBlockResourceThrottle::ActivatePowerSaveBlocker() { | 42 void PowerSaveBlockResourceThrottle::ActivatePowerSaveBlocker() { |
43 power_save_blocker_ = CreatePowerSaveBlocker( | 43 power_save_blocker_ = CreatePowerSaveBlocker( |
44 PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, | 44 device::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, |
45 PowerSaveBlocker::kReasonOther, "Uploading data to " + host_); | 45 device::PowerSaveBlocker::kReasonOther, "Uploading data to " + host_); |
46 } | 46 } |
47 | 47 |
48 } // namespace content | 48 } // namespace content |
OLD | NEW |