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" |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 USE_MOCK_SERVICE = 0x8, | 379 USE_MOCK_SERVICE = 0x8, |
380 // Permits mocking of the underlying |DataReductionProxyRequestOptions|. | 380 // Permits mocking of the underlying |DataReductionProxyRequestOptions|. |
381 USE_MOCK_REQUEST_OPTIONS = 0x10, | 381 USE_MOCK_REQUEST_OPTIONS = 0x10, |
382 // Specifies the use of the |DataReductionProxyConfigServiceClient|. | 382 // Specifies the use of the |DataReductionProxyConfigServiceClient|. |
383 USE_CONFIG_CLIENT = 0x20, | 383 USE_CONFIG_CLIENT = 0x20, |
384 // Specifies the use of the |TESTDataReductionProxyConfigServiceClient|. | 384 // Specifies the use of the |TESTDataReductionProxyConfigServiceClient|. |
385 USE_TEST_CONFIG_CLIENT = 0x40, | 385 USE_TEST_CONFIG_CLIENT = 0x40, |
386 }; | 386 }; |
387 | 387 |
388 DataReductionProxyTestContext( | 388 DataReductionProxyTestContext( |
389 scoped_ptr<base::MessageLoop> loop, | |
390 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 389 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
391 scoped_ptr<TestingPrefServiceSimple> simple_pref_service, | 390 scoped_ptr<TestingPrefServiceSimple> simple_pref_service, |
392 scoped_ptr<net::TestNetLog> net_log, | 391 scoped_ptr<net::TestNetLog> net_log, |
393 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 392 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
394 net::MockClientSocketFactory* mock_socket_factory, | 393 net::MockClientSocketFactory* mock_socket_factory, |
395 scoped_ptr<TestDataReductionProxyIOData> io_data, | 394 scoped_ptr<TestDataReductionProxyIOData> io_data, |
396 scoped_ptr<DataReductionProxySettings> settings, | 395 scoped_ptr<DataReductionProxySettings> settings, |
397 scoped_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate, | 396 scoped_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate, |
398 TestDataReductionProxyParams* params, | 397 TestDataReductionProxyParams* params, |
399 unsigned int test_context_flags); | 398 unsigned int test_context_flags); |
400 | 399 |
401 void InitSettingsWithoutCheck(); | 400 void InitSettingsWithoutCheck(); |
402 | 401 |
403 scoped_ptr<DataReductionProxyService> | 402 scoped_ptr<DataReductionProxyService> |
404 CreateDataReductionProxyServiceInternal(); | 403 CreateDataReductionProxyServiceInternal(); |
405 | 404 |
406 unsigned int test_context_flags_; | 405 unsigned int test_context_flags_; |
407 | 406 |
408 scoped_ptr<base::MessageLoop> loop_; | |
409 | |
410 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 407 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
411 scoped_ptr<TestingPrefServiceSimple> simple_pref_service_; | 408 scoped_ptr<TestingPrefServiceSimple> simple_pref_service_; |
412 scoped_ptr<net::TestNetLog> net_log_; | 409 scoped_ptr<net::TestNetLog> net_log_; |
413 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 410 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
414 // Non-owned pointer. Will be NULL if |this| was built without specifying a | 411 // Non-owned pointer. Will be NULL if |this| was built without specifying a |
415 // |net::MockClientSocketFactory|. | 412 // |net::MockClientSocketFactory|. |
416 net::MockClientSocketFactory* mock_socket_factory_; | 413 net::MockClientSocketFactory* mock_socket_factory_; |
417 | 414 |
418 scoped_ptr<TestDataReductionProxyIOData> io_data_; | 415 scoped_ptr<TestDataReductionProxyIOData> io_data_; |
419 scoped_ptr<DataReductionProxySettings> settings_; | 416 scoped_ptr<DataReductionProxySettings> settings_; |
420 scoped_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate_; | 417 scoped_ptr<TestDataReductionProxyEventStorageDelegate> storage_delegate_; |
421 | 418 |
422 TestDataReductionProxyParams* params_; | 419 TestDataReductionProxyParams* params_; |
423 | 420 |
424 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyTestContext); | 421 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyTestContext); |
425 }; | 422 }; |
426 | 423 |
427 } // namespace data_reduction_proxy | 424 } // namespace data_reduction_proxy |
428 | 425 |
429 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TES
T_UTILS_H_ | 426 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_TES
T_UTILS_H_ |
OLD | NEW |