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

Side by Side Diff: components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/util/CrashReportingNetworkPermissionManager.java

Issue 2751333004: [Crash Reporting] Only upload Chrome crash reports over unmetered networks. (Closed)
Patch Set: This is the last self-review patch set, I swear! :-P Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.components.minidump_uploader.util;
6
7 import android.net.ConnectivityManager;
8 import android.net.NetworkInfo;
9
10 /**
11 * A container for determining whether it's ok to upload crash reports over the currently active
12 * network.
13 */
14 public class CrashReportingNetworkPermissionManager {
Maria 2017/03/17 04:04:28 given that there's nothing specific to crash repor
Maria 2017/03/17 04:04:28 FYI, you are missing a BUILD file change to add th
gsennton 2017/03/20 17:29:01 +1 for the name change
Ilya Sherman 2017/03/20 23:11:21 Done.
Ilya Sherman 2017/03/20 23:11:21 Done.
15 static boolean isNetworkUnmetered(ConnectivityManager connectivityManager) {
16 NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
17 if (networkInfo == null || !networkInfo.isConnected()) return false;
18 return !mConnectivityManager.isActiveNetworkMetered();
19 }
20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698