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 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_U
TILS_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_U
TILS_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_U
TILS_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TEST_U
TILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypa
ss_stats.h" | 15 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypa
ss_stats.h" |
16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_service_client.h" | 16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig_service_client.h" |
17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ
est_options.h" | 18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ
est_options.h" |
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv
ice.h" | 19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv
ice.h" |
20 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings_test_utils.h" | 20 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings_test_utils.h" |
21 #include "net/base/backoff_entry.h" | 21 #include "net/base/backoff_entry.h" |
22 #include "net/log/capturing_net_log.h" | 22 #include "net/log/test_net_log.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 | 24 |
25 class TestingPrefServiceSimple; | 25 class TestingPrefServiceSimple; |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class MessageLoopForUI; | 28 class MessageLoopForUI; |
29 } | 29 } |
30 | 30 |
31 namespace net { | 31 namespace net { |
32 class MockClientSocketFactory; | 32 class MockClientSocketFactory; |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // Specifies the use of the |DataReductionProxyConfigServiceClient|. | 389 // Specifies the use of the |DataReductionProxyConfigServiceClient|. |
390 USE_CONFIG_CLIENT = 0x20, | 390 USE_CONFIG_CLIENT = 0x20, |
391 // Specifies the use of the |TESTDataReductionProxyConfigServiceClient|. | 391 // Specifies the use of the |TESTDataReductionProxyConfigServiceClient|. |
392 USE_TEST_CONFIG_CLIENT = 0x40, | 392 USE_TEST_CONFIG_CLIENT = 0x40, |
393 }; | 393 }; |
394 | 394 |
395 DataReductionProxyTestContext( | 395 DataReductionProxyTestContext( |
396 scoped_ptr<base::MessageLoop> loop, | 396 scoped_ptr<base::MessageLoop> loop, |
397 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 397 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
398 scoped_ptr<TestingPrefServiceSimple> simple_pref_service, | 398 scoped_ptr<TestingPrefServiceSimple> simple_pref_service, |
399 scoped_ptr<net::CapturingNetLog> net_log, | 399 scoped_ptr<net::TestNetLog> net_log, |
400 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 400 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
401 net::MockClientSocketFactory* mock_socket_factory, | 401 net::MockClientSocketFactory* mock_socket_factory, |
402 scoped_ptr<TestDataReductionProxyIOData> io_data, | 402 scoped_ptr<TestDataReductionProxyIOData> io_data, |
403 scoped_ptr<DataReductionProxySettings> settings, | 403 scoped_ptr<DataReductionProxySettings> settings, |
404 TestDataReductionProxyParams* params, | 404 TestDataReductionProxyParams* params, |
405 unsigned int test_context_flags); | 405 unsigned int test_context_flags); |
406 | 406 |
407 void InitSettingsWithoutCheck(); | 407 void InitSettingsWithoutCheck(); |
408 | 408 |
409 scoped_ptr<DataReductionProxyService> | 409 scoped_ptr<DataReductionProxyService> |
410 CreateDataReductionProxyServiceInternal(); | 410 CreateDataReductionProxyServiceInternal(); |
411 | 411 |
412 unsigned int test_context_flags_; | 412 unsigned int test_context_flags_; |
413 | 413 |
414 scoped_ptr<base::MessageLoop> loop_; | 414 scoped_ptr<base::MessageLoop> loop_; |
415 | 415 |
416 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 416 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
417 scoped_ptr<TestingPrefServiceSimple> simple_pref_service_; | 417 scoped_ptr<TestingPrefServiceSimple> simple_pref_service_; |
418 scoped_ptr<net::CapturingNetLog> net_log_; | 418 scoped_ptr<net::TestNetLog> net_log_; |
419 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 419 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
420 // Non-owned pointer. Will be NULL if |this| was built without specifying a | 420 // Non-owned pointer. Will be NULL if |this| was built without specifying a |
421 // |net::MockClientSocketFactory|. | 421 // |net::MockClientSocketFactory|. |
422 net::MockClientSocketFactory* mock_socket_factory_; | 422 net::MockClientSocketFactory* mock_socket_factory_; |
423 | 423 |
424 scoped_ptr<TestDataReductionProxyIOData> io_data_; | 424 scoped_ptr<TestDataReductionProxyIOData> io_data_; |
425 scoped_ptr<DataReductionProxySettings> settings_; | 425 scoped_ptr<DataReductionProxySettings> settings_; |
426 | 426 |
427 TestDataReductionProxyParams* params_; | 427 TestDataReductionProxyParams* params_; |
428 | 428 |
429 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyTestContext); | 429 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyTestContext); |
430 }; | 430 }; |
431 | 431 |
432 } // namespace data_reduction_proxy | 432 } // namespace data_reduction_proxy |
433 | 433 |
434 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TES
T_UTILS_H_ | 434 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TES
T_UTILS_H_ |
OLD | NEW |