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

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

Issue 9465030: Break two classes defined in json_value_serializer.cc, .h into separate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "base/tracked_objects.h" 11 #include "base/tracked_objects.h"
12 #include "content/public/common/content_client.h" 12 #include "content/public/common/content_client.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 14
15 namespace task_profiler { 15 namespace task_profiler {
16 16
17 bool TaskProfilerDataSerializer::WriteToFile(const FilePath &path) { 17 bool TaskProfilerDataSerializer::WriteToFile(const FilePath &path) {
18 std::string output; 18 std::string output;
19 JSONStringValueSerializer serializer(&output); 19 JSONStringValueSerializer serializer(&output);
(...skipping 21 matching lines...) Expand all
41 snapshot_list->Append(shutdown_snapshot); 41 snapshot_list->Append(shutdown_snapshot);
42 root->Set("snapshots", snapshot_list); 42 root->Set("snapshots", snapshot_list);
43 43
44 serializer.Serialize(*root); 44 serializer.Serialize(*root);
45 int data_size = static_cast<int>(output.size()); 45 int data_size = static_cast<int>(output.size());
46 46
47 return data_size == file_util::WriteFile(path, output.data(), data_size); 47 return data_size == file_util::WriteFile(path, output.data(), data_size);
48 } 48 }
49 49
50 } // namespace task_profiler 50 } // namespace task_profiler
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_preference_unittest.cc ('k') | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698