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

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

Issue 2318033002: c/browser, c/common, components M-N: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Rebase and fix PnaclTranslationCacheTest Created 4 years, 3 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
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_file_writer.h" 5 #include "components/net_log/net_log_file_writer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 30 matching lines...) Expand all
41 lie_about_net_export_log_directory_(false) { 41 lie_about_net_export_log_directory_(false) {
42 EXPECT_TRUE(net_log_temp_dir_.CreateUniqueTempDir()); 42 EXPECT_TRUE(net_log_temp_dir_.CreateUniqueTempDir());
43 } 43 }
44 44
45 ~TestNetLogFileWriter() override { EXPECT_TRUE(net_log_temp_dir_.Delete()); } 45 ~TestNetLogFileWriter() override { EXPECT_TRUE(net_log_temp_dir_.Delete()); }
46 46
47 // NetLogFileWriter implementation: 47 // NetLogFileWriter implementation:
48 bool GetNetExportLogBaseDirectory(base::FilePath* path) const override { 48 bool GetNetExportLogBaseDirectory(base::FilePath* path) const override {
49 if (lie_about_net_export_log_directory_) 49 if (lie_about_net_export_log_directory_)
50 return false; 50 return false;
51 *path = net_log_temp_dir_.path(); 51 *path = net_log_temp_dir_.GetPath();
52 return true; 52 return true;
53 } 53 }
54 54
55 void set_lie_about_net_export_log_directory( 55 void set_lie_about_net_export_log_directory(
56 bool lie_about_net_export_log_directory) { 56 bool lie_about_net_export_log_directory) {
57 lie_about_net_export_log_directory_ = lie_about_net_export_log_directory; 57 lie_about_net_export_log_directory_ = lie_about_net_export_log_directory;
58 } 58 }
59 59
60 private: 60 private:
61 bool lie_about_net_export_log_directory_; 61 bool lie_about_net_export_log_directory_;
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 net_log_file_writer_->ProcessCommand(NetLogFileWriter::DO_STOP); 438 net_log_file_writer_->ProcessCommand(NetLogFileWriter::DO_STOP);
439 VerifyFileAndStateAfterDoStop(); 439 VerifyFileAndStateAfterDoStop();
440 440
441 int64_t new_stop_file_size; 441 int64_t new_stop_file_size;
442 EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_stop_file_size)); 442 EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_stop_file_size));
443 EXPECT_GE(new_stop_file_size, stop_file_size); 443 EXPECT_GE(new_stop_file_size, stop_file_size);
444 } 444 }
445 445
446 } // namespace net_log 446 } // namespace net_log
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698