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

Unified Diff: net/http/http_network_layer.cc

Issue 179923006: Attempting to resolve a race condition with PowerMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win64 fixes Created 6 years, 9 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 | « media/audio/mac/audio_manager_mac.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_layer.cc
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index 0704de420de32d29349e8e6d50f311387a362db3..9d6dc041bc5329adac273291da329c6a413f318c 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -25,17 +25,13 @@ HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session)
suspended_(false) {
DCHECK(session_.get());
#if defined(OS_WIN)
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
- if (power_monitor)
- power_monitor->AddObserver(this);
+ base::PowerMonitor::AddObserver(this);
#endif
}
HttpNetworkLayer::~HttpNetworkLayer() {
#if defined(OS_WIN)
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
- if (power_monitor)
- power_monitor->RemoveObserver(this);
+ base::PowerMonitor::RemoveObserver(this);
#endif
}
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698