diff options
author | vishal.b <vishal.b@samsung.com> | 2015-04-23 06:10:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-23 13:10:43 +0000 |
commit | 94fed10d9232ff086aa2431a8ef4522a0728aa08 (patch) | |
tree | 8172312fea63ea711d9dcd8e24d470855cc579ee /components/cronet | |
parent | 27548a7d34c6e17710b7a642c35de82b53843155 (diff) | |
download | chromium_src-94fed10d9232ff086aa2431a8ef4522a0728aa08.zip chromium_src-94fed10d9232ff086aa2431a8ef4522a0728aa08.tar.gz chromium_src-94fed10d9232ff086aa2431a8ef4522a0728aa08.tar.bz2 |
net_log_logger_ replaced with write_to_file_observer_ considering https://codereview.chromium.org/1084533002 refactor
BUG=473252
TBR=jam
Review URL: https://codereview.chromium.org/1079163007
Cr-Commit-Position: refs/heads/master@{#326499}
Diffstat (limited to 'components/cronet')
4 files changed, 18 insertions, 17 deletions
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc index 5a1f569..82446a8 100644 --- a/components/cronet/android/cronet_url_request_context_adapter.cc +++ b/components/cronet/android/cronet_url_request_context_adapter.cc @@ -286,23 +286,23 @@ void CronetURLRequestContextAdapter::StartNetLogToFileOnNetworkThread( DCHECK(is_context_initialized_); DCHECK(context_); // Do nothing if already logging to a file. - if (net_log_logger_) + if (write_to_file_observer_) return; base::FilePath file_path(file_name); base::ScopedFILE file(base::OpenFile(file_path, "w")); if (!file) return; - net_log_logger_.reset(new net::WriteToFileNetLogObserver()); - net_log_logger_->StartObserving(context_->net_log(), file.Pass(), nullptr, - context_.get()); + write_to_file_observer_.reset(new net::WriteToFileNetLogObserver()); + write_to_file_observer_->StartObserving(context_->net_log(), file.Pass(), + nullptr, context_.get()); } void CronetURLRequestContextAdapter::StopNetLogOnNetworkThread() { DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); - if (net_log_logger_) { - net_log_logger_->StopObserving(context_.get()); - net_log_logger_.reset(); + if (write_to_file_observer_) { + write_to_file_observer_->StopObserving(context_.get()); + write_to_file_observer_.reset(); } } diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h index d20c02fc..fea2454 100644 --- a/components/cronet/android/cronet_url_request_context_adapter.h +++ b/components/cronet/android/cronet_url_request_context_adapter.h @@ -86,8 +86,9 @@ class CronetURLRequestContextAdapter { // Network thread is owned by |this|, but is destroyed from java thread. base::Thread* network_thread_; - // |net_log_logger_| and |context_| should only be accessed on network thread. - scoped_ptr<net::WriteToFileNetLogObserver> net_log_logger_; + // |write_to_file_observer_| and |context_| should only be accessed on + // network thread. + scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; scoped_ptr<net::URLRequestContext> context_; scoped_ptr<net::ProxyConfigService> proxy_config_service_; diff --git a/components/cronet/android/url_request_context_adapter.cc b/components/cronet/android/url_request_context_adapter.cc index 8fc3e02..30e84d9 100644 --- a/components/cronet/android/url_request_context_adapter.cc +++ b/components/cronet/android/url_request_context_adapter.cc @@ -278,7 +278,7 @@ void URLRequestContextAdapter::StartNetLogToFileHelper( const std::string& file_name) { DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); // Do nothing if already logging to a file. - if (net_log_logger_) + if (write_to_file_observer_) return; base::FilePath file_path(file_name); @@ -286,16 +286,16 @@ void URLRequestContextAdapter::StartNetLogToFileHelper( if (!file) return; - net_log_logger_.reset(new net::WriteToFileNetLogObserver()); - net_log_logger_->StartObserving(context_->net_log(), file.Pass(), nullptr, - context_.get()); + write_to_file_observer_.reset(new net::WriteToFileNetLogObserver()); + write_to_file_observer_->StartObserving(context_->net_log(), file.Pass(), + nullptr, context_.get()); } void URLRequestContextAdapter::StopNetLogHelper() { DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread()); - if (net_log_logger_) { - net_log_logger_->StopObserving(context_.get()); - net_log_logger_.reset(); + if (write_to_file_observer_) { + write_to_file_observer_->StopObserving(context_.get()); + write_to_file_observer_.reset(); } } diff --git a/components/cronet/android/url_request_context_adapter.h b/components/cronet/android/url_request_context_adapter.h index 932ad92..cdcc79f 100644 --- a/components/cronet/android/url_request_context_adapter.h +++ b/components/cronet/android/url_request_context_adapter.h @@ -107,7 +107,7 @@ class URLRequestContextAdapter : public net::URLRequestContextGetter { bool load_disable_cache_; base::Thread* network_thread_; scoped_ptr<NetLogObserver> net_log_observer_; - scoped_ptr<net::WriteToFileNetLogObserver> net_log_logger_; + scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; scoped_ptr<net::ProxyConfigService> proxy_config_service_; scoped_ptr<URLRequestContextConfig> config_; |