OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/background_sync_network_observer_android.h" | 5 #include "content/browser/android/background_sync_network_observer_android.h" |
6 | 6 |
| 7 #include "base/android/context_utils.h" |
7 #include "jni/BackgroundSyncNetworkObserver_jni.h" | 8 #include "jni/BackgroundSyncNetworkObserver_jni.h" |
8 | 9 |
9 namespace content { | 10 namespace content { |
10 | 11 |
11 // static | 12 // static |
12 bool BackgroundSyncNetworkObserverAndroid::Observer::RegisterNetworkObserver( | 13 bool BackgroundSyncNetworkObserverAndroid::Observer::RegisterNetworkObserver( |
13 JNIEnv* env) { | 14 JNIEnv* env) { |
14 return RegisterNativesImpl(env); | 15 return RegisterNativesImpl(env); |
15 } | 16 } |
16 | 17 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 78 |
78 observer_ = Observer::Create( | 79 observer_ = Observer::Create( |
79 base::Bind(&BackgroundSyncNetworkObserverAndroid::OnNetworkChanged, | 80 base::Bind(&BackgroundSyncNetworkObserverAndroid::OnNetworkChanged, |
80 weak_ptr_factory_.GetWeakPtr())); | 81 weak_ptr_factory_.GetWeakPtr())); |
81 } | 82 } |
82 | 83 |
83 BackgroundSyncNetworkObserverAndroid::~BackgroundSyncNetworkObserverAndroid() { | 84 BackgroundSyncNetworkObserverAndroid::~BackgroundSyncNetworkObserverAndroid() { |
84 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 85 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
85 } | 86 } |
86 } // namespace content | 87 } // namespace content |
OLD | NEW |