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

Side by Side Diff: base/files/file_tracing.cc

Issue 2163063002: Make File::Duplicate() const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert unneeded 'private:' label Created 4 years, 5 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 | « base/files/file_tracing.h ('k') | base/files/file_win.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/files/file_tracing.h" 5 #include "base/files/file_tracing.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 8
9 namespace base { 9 namespace base {
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 FileTracing::ScopedTrace::ScopedTrace() : id_(nullptr) {} 35 FileTracing::ScopedTrace::ScopedTrace() : id_(nullptr) {}
36 36
37 FileTracing::ScopedTrace::~ScopedTrace() { 37 FileTracing::ScopedTrace::~ScopedTrace() {
38 if (id_ && g_provider) 38 if (id_ && g_provider)
39 g_provider->FileTracingEventEnd(name_, id_); 39 g_provider->FileTracingEventEnd(name_, id_);
40 } 40 }
41 41
42 void FileTracing::ScopedTrace::Initialize(const char* name, 42 void FileTracing::ScopedTrace::Initialize(const char* name,
43 File* file, 43 const File* file,
44 int64_t size) { 44 int64_t size) {
45 id_ = &file->trace_enabler_; 45 id_ = &file->trace_enabler_;
46 name_ = name; 46 name_ = name;
47 g_provider->FileTracingEventBegin(name_, id_, file->tracing_path_, size); 47 g_provider->FileTracingEventBegin(name_, id_, file->tracing_path_, size);
48 } 48 }
49 49
50 } // namespace base 50 } // namespace base
OLDNEW
« no previous file with comments | « base/files/file_tracing.h ('k') | base/files/file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698