| 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 "components/data_use_measurement/content/data_use_measurement.h" | 5 #include "components/data_use_measurement/content/data_use_measurement.h" | 
| 6 | 6 | 
| 7 #include <string> | 7 #include <string> | 
| 8 | 8 | 
|  | 9 #include "base/macros.h" | 
| 9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" | 
| 10 #include "base/test/histogram_tester.h" | 11 #include "base/test/histogram_tester.h" | 
|  | 12 #include "build/build_config.h" | 
| 11 #include "content/public/browser/resource_request_info.h" | 13 #include "content/public/browser/resource_request_info.h" | 
| 12 #include "net/base/network_change_notifier.h" | 14 #include "net/base/network_change_notifier.h" | 
| 13 #include "net/base/request_priority.h" | 15 #include "net/base/request_priority.h" | 
| 14 #include "net/socket/socket_test_util.h" | 16 #include "net/socket/socket_test_util.h" | 
| 15 #include "net/url_request/url_request.h" | 17 #include "net/url_request/url_request.h" | 
| 16 #include "net/url_request/url_request_test_util.h" | 18 #include "net/url_request/url_request_test_util.h" | 
| 17 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" | 
| 18 #include "url/gurl.h" | 20 #include "url/gurl.h" | 
| 19 | 21 | 
| 20 #if defined(OS_ANDROID) | 22 #if defined(OS_ANDROID) | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 142 // background and OS is Android. | 144 // background and OS is Android. | 
| 143 TEST_F(DataUseMeasurementTest, ApplicationStateTest) { | 145 TEST_F(DataUseMeasurementTest, ApplicationStateTest) { | 
| 144   data_use_measurement()->OnApplicationStateChangeForTesting( | 146   data_use_measurement()->OnApplicationStateChangeForTesting( | 
| 145       base::android::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES); | 147       base::android::APPLICATION_STATE_HAS_STOPPED_ACTIVITIES); | 
| 146   TestForAServiceRequest("Background."); | 148   TestForAServiceRequest("Background."); | 
| 147   TestForAUserRequest("Background."); | 149   TestForAUserRequest("Background."); | 
| 148 } | 150 } | 
| 149 #endif | 151 #endif | 
| 150 | 152 | 
| 151 }  // namespace data_use_measurement | 153 }  // namespace data_use_measurement | 
| OLD | NEW | 
|---|