Revert of Add granular base::File tracing. (patchset #10 id:490001 of https://codereview.chromium.org/1072133006/)
Reason for revert:
See if this broke sizes by increasing setup.exe by 0.43%.
Original issue's description:
> Add granular base::File tracing.
>
> R=thestig@chromium.org,nduca@chromium.org
> BUG=480665
>
> Committed: https://crrev.com/a6e05c977096a03774e5406d63ad80c0166f9adc
> Cr-Commit-Position: refs/heads/master@{#328153}
TBR=thestig@chromium.org,nduca@chromium.org,oysteine@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=480665
Review URL: https://codereview.chromium.org/1127713004
Cr-Commit-Position: refs/heads/master@{#328241}
CrOS-Libchrome-Original-Commit: 0f045e96533304388b88da9c4af42039790d8942
diff --git a/base/files/file.cc b/base/files/file.cc
index 774539f..8030bf1 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -4,7 +4,6 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
-#include "base/files/file_tracing.h"
#include "base/metrics/histogram.h"
#include "base/timer/elapsed_timer.h"
@@ -26,11 +25,11 @@
}
#if !defined(OS_NACL)
-File::File(const FilePath& path, uint32 flags)
+File::File(const FilePath& name, uint32 flags)
: error_details_(FILE_OK),
created_(false),
async_(false) {
- Initialize(path, flags);
+ Initialize(name, flags);
}
#endif
@@ -52,7 +51,6 @@
File::File(RValue other)
: file_(other.object->TakePlatformFile()),
- path_(other.object->path_),
error_details_(other.object->error_details()),
created_(other.object->created()),
async_(other.object->async_) {
@@ -67,7 +65,6 @@
if (this != other.object) {
Close();
SetPlatformFile(other.object->TakePlatformFile());
- path_ = other.object->path_;
error_details_ = other.object->error_details();
created_ = other.object->created();
async_ = other.object->async_;
@@ -76,14 +73,12 @@
}
#if !defined(OS_NACL)
-void File::Initialize(const FilePath& path, uint32 flags) {
- if (path.ReferencesParent()) {
+void File::Initialize(const FilePath& name, uint32 flags) {
+ if (name.ReferencesParent()) {
error_details_ = FILE_ERROR_ACCESS_DENIED;
return;
}
- path_ = path;
- SCOPED_FILE_TRACE("Initialize");
- DoInitialize(flags);
+ DoInitialize(name, flags);
}
#endif
@@ -133,18 +128,9 @@
bool File::Flush() {
ElapsedTimer timer;
- SCOPED_FILE_TRACE("Flush");
bool return_value = DoFlush();
UMA_HISTOGRAM_TIMES("PlatformFile.FlushTime", timer.Elapsed());
return return_value;
}
-File::TraceEnabler::TraceEnabler() {
- FILE_TRACING_BEGIN();
-}
-
-File::TraceEnabler::~TraceEnabler() {
- FILE_TRACING_END();
-}
-
} // namespace base