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

Side by Side Diff: chrome/browser/task_profiler/task_profiler_data_serializer.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/task_profiler/task_profiler_data_serializer.h" 5 #include "chrome/browser/task_profiler/task_profiler_data_serializer.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 shutdown_snapshot->SetInteger( 157 shutdown_snapshot->SetInteger(
158 "timestamp", 158 "timestamp",
159 (base::Time::Now() - base::Time::UnixEpoch()).InSeconds()); 159 (base::Time::Now() - base::Time::UnixEpoch()).InSeconds());
160 shutdown_snapshot->Set("data", per_process_data); 160 shutdown_snapshot->Set("data", per_process_data);
161 snapshot_list->Append(shutdown_snapshot); 161 snapshot_list->Append(shutdown_snapshot);
162 root->Set("snapshots", snapshot_list); 162 root->Set("snapshots", snapshot_list);
163 163
164 serializer.Serialize(*root); 164 serializer.Serialize(*root);
165 int data_size = static_cast<int>(output.size()); 165 int data_size = static_cast<int>(output.size());
166 166
167 return data_size == file_util::WriteFile(path, output.data(), data_size); 167 return data_size == base::WriteFile(path, output.data(), data_size);
168 } 168 }
169 169
170 } // namespace task_profiler 170 } // namespace task_profiler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698