Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: content/browser/loader/power_save_block_resource_throttle.h

Issue 2893873002: Convert PowerSaveBlockResourceThrottle to be client of WakeLock mojo service. (Closed)
Patch Set: Convert PowerSaveBlockResourceThrottle to be client of WakeLock mojo service. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/power_save_block_resource_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/power_save_block_resource_throttle.h
diff --git a/content/browser/loader/power_save_block_resource_throttle.h b/content/browser/loader/power_save_block_resource_throttle.h
deleted file mode 100644
index 67b8a9f6953e66879369b6506089c63c7d84196b..0000000000000000000000000000000000000000
--- a/content/browser/loader/power_save_block_resource_throttle.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
-#define CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
-
-#include <memory>
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/sequenced_task_runner.h"
-#include "base/single_thread_task_runner.h"
-#include "base/timer/timer.h"
-#include "content/public/browser/resource_throttle.h"
-
-namespace device {
-class PowerSaveBlocker;
-} // namespace device
-
-namespace content {
-
-// This ResourceThrottle blocks power save until large upload request finishes.
-class PowerSaveBlockResourceThrottle : public ResourceThrottle {
- public:
- PowerSaveBlockResourceThrottle(
- const std::string& host,
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner);
- ~PowerSaveBlockResourceThrottle() override;
-
- // ResourceThrottle overrides:
- void WillStartRequest(bool* defer) override;
- void WillProcessResponse(bool* defer) override;
- const char* GetNameForLogging() const override;
-
- private:
- void ActivatePowerSaveBlocker();
-
- const std::string host_;
- base::OneShotTimer timer_;
- std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
- scoped_refptr<base::SingleThreadTaskRunner> blocking_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockResourceThrottle);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/power_save_block_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698