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

Unified Diff: chrome/browser/chromeos/net/network_throttling_observer.cc

Issue 2465743003: Fix memory leak in NetworkThrottlingObserverTest (Closed)
Patch Set: Fix memory leak in NetworkThrottlingObserverTest Created 4 years, 1 month 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
Index: chrome/browser/chromeos/net/network_throttling_observer.cc
diff --git a/chrome/browser/chromeos/net/network_throttling_observer.cc b/chrome/browser/chromeos/net/network_throttling_observer.cc
index 352c9d0b514e50f3d217ca6c471a64460363d696..c2022e38e1d0710ed8e593c32075121f13281e2d 100644
--- a/chrome/browser/chromeos/net/network_throttling_observer.cc
+++ b/chrome/browser/chromeos/net/network_throttling_observer.cc
@@ -47,7 +47,8 @@ void NetworkThrottlingObserver::OnPreferenceChanged(
bool enabled = false;
uint32_t upload_rate = 0, download_rate = 0;
if (throttling_policy) {
- int upload_rate_read, download_rate_read;
+ int upload_rate_read = 0;
+ int download_rate_read = 0;
throttling_policy->GetBoolean("enabled", &enabled);

Powered by Google App Engine
This is Rietveld 408576698