OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/crnet/crnet_environment.h" | 5 #include "ios/crnet/crnet_environment.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/files/scoped_file.h" | 13 #include "base/files/scoped_file.h" |
14 #include "base/i18n/icu_util.h" | 14 #include "base/i18n/icu_util.h" |
15 #include "base/json/json_writer.h" | 15 #include "base/json/json_writer.h" |
16 #include "base/mac/bind_objc_block.h" | 16 #include "base/mac/bind_objc_block.h" |
17 #include "base/mac/foundation_util.h" | 17 #include "base/mac/foundation_util.h" |
18 #include "base/mac/scoped_block.h" | 18 #include "base/mac/scoped_block.h" |
| 19 #include "base/macros.h" |
19 #include "base/metrics/statistics_recorder.h" | 20 #include "base/metrics/statistics_recorder.h" |
20 #include "base/path_service.h" | 21 #include "base/path_service.h" |
21 #include "base/prefs/json_pref_store.h" | 22 #include "base/prefs/json_pref_store.h" |
22 #include "base/prefs/pref_filter.h" | 23 #include "base/prefs/pref_filter.h" |
23 #include "base/threading/worker_pool.h" | 24 #include "base/threading/worker_pool.h" |
24 #import "components/webp_transcode/webp_network_client_factory.h" | 25 #import "components/webp_transcode/webp_network_client_factory.h" |
25 #include "crypto/nss_util.h" | 26 #include "crypto/nss_util.h" |
26 #include "ios/net/cookies/cookie_store_ios.h" | 27 #include "ios/net/cookies/cookie_store_ios.h" |
27 #include "ios/net/crn_http_protocol_handler.h" | 28 #include "ios/net/crn_http_protocol_handler.h" |
28 #include "ios/net/empty_nsurlcache.h" | 29 #include "ios/net/empty_nsurlcache.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 487 |
487 return user_agent_settings->GetUserAgent(); | 488 return user_agent_settings->GetUserAgent(); |
488 } | 489 } |
489 | 490 |
490 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { | 491 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { |
491 PostToNetworkThread( | 492 PostToNetworkThread( |
492 FROM_HERE, | 493 FROM_HERE, |
493 base::Bind(&net::ClearHttpCache, main_context_getter_, | 494 base::Bind(&net::ClearHttpCache, main_context_getter_, |
494 network_io_thread_->task_runner(), base::BindBlock(callback))); | 495 network_io_thread_->task_runner(), base::BindBlock(callback))); |
495 } | 496 } |
OLD | NEW |