Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: components/net_log/net_log_temp_file.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/net_log/chrome_net_log.cc ('k') | components/network_time/network_time_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/net_log/net_log_temp_file.h" 5 #include "components/net_log/net_log_temp_file.h"
6 6
7 #include <utility>
8
7 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
9 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
10 #include "base/values.h" 12 #include "base/values.h"
11 #include "build/build_config.h" 13 #include "build/build_config.h"
12 #include "components/net_log/chrome_net_log.h" 14 #include "components/net_log/chrome_net_log.h"
13 #include "net/log/write_to_file_net_log_observer.h" 15 #include "net/log/write_to_file_net_log_observer.h"
14 16
15 namespace net_log { 17 namespace net_log {
16 18
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (!file) 183 if (!file)
182 return; 184 return;
183 185
184 log_type_ = log_type; 186 log_type_ = log_type;
185 state_ = STATE_LOGGING; 187 state_ = STATE_LOGGING;
186 188
187 scoped_ptr<base::Value> constants( 189 scoped_ptr<base::Value> constants(
188 ChromeNetLog::GetConstants(command_line_string_, channel_string_)); 190 ChromeNetLog::GetConstants(command_line_string_, channel_string_));
189 write_to_file_observer_.reset(new net::WriteToFileNetLogObserver()); 191 write_to_file_observer_.reset(new net::WriteToFileNetLogObserver());
190 write_to_file_observer_->set_capture_mode(GetCaptureModeForLogType(log_type)); 192 write_to_file_observer_->set_capture_mode(GetCaptureModeForLogType(log_type));
191 write_to_file_observer_->StartObserving(chrome_net_log_, file.Pass(), 193 write_to_file_observer_->StartObserving(chrome_net_log_, std::move(file),
192 constants.get(), nullptr); 194 constants.get(), nullptr);
193 } 195 }
194 196
195 void NetLogTempFile::StopNetLog() { 197 void NetLogTempFile::StopNetLog() {
196 DCHECK(thread_checker_.CalledOnValidThread()); 198 DCHECK(thread_checker_.CalledOnValidThread());
197 if (state_ != STATE_LOGGING) 199 if (state_ != STATE_LOGGING)
198 return; 200 return;
199 201
200 write_to_file_observer_->StopObserving(nullptr); 202 write_to_file_observer_->StopObserving(nullptr);
201 write_to_file_observer_.reset(); 203 write_to_file_observer_.reset();
(...skipping 19 matching lines...) Expand all
221 return true; 223 return true;
222 } 224 }
223 225
224 bool NetLogTempFile::NetExportLogExists() const { 226 bool NetLogTempFile::NetExportLogExists() const {
225 DCHECK(thread_checker_.CalledOnValidThread()); 227 DCHECK(thread_checker_.CalledOnValidThread());
226 DCHECK(!log_path_.empty()); 228 DCHECK(!log_path_.empty());
227 return base::PathExists(log_path_); 229 return base::PathExists(log_path_);
228 } 230 }
229 231
230 } // namespace net_log 232 } // namespace net_log
OLDNEW
« no previous file with comments | « components/net_log/chrome_net_log.cc ('k') | components/network_time/network_time_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698