OLD | NEW |
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/performance_monitor/performance_monitor_util.h" | 5 #include "chrome/browser/performance_monitor/performance_monitor_util.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
11 #include "base/time.h" | 11 #include "base/time/time.h" |
12 #include "chrome/browser/performance_monitor/events.h" | 12 #include "chrome/browser/performance_monitor/events.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 | 14 |
15 namespace performance_monitor { | 15 namespace performance_monitor { |
16 namespace util { | 16 namespace util { |
17 | 17 |
18 bool PostTaskToDatabaseThreadAndReply( | 18 bool PostTaskToDatabaseThreadAndReply( |
19 const tracked_objects::Location& from_here, | 19 const tracked_objects::Location& from_here, |
20 const base::Closure& request, | 20 const base::Closure& request, |
21 const base::Closure& reply) { | 21 const base::Closure& reply) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 event.time = static_cast<double>(time.ToInternalValue()); | 78 event.time = static_cast<double>(time.ToInternalValue()); |
79 event.previous_version = previous_version; | 79 event.previous_version = previous_version; |
80 event.current_version = current_version; | 80 event.current_version = current_version; |
81 scoped_ptr<base::DictionaryValue> value = event.ToValue(); | 81 scoped_ptr<base::DictionaryValue> value = event.ToValue(); |
82 return scoped_ptr<Event>(new Event( | 82 return scoped_ptr<Event>(new Event( |
83 EVENT_CHROME_UPDATE, time, value.Pass())); | 83 EVENT_CHROME_UPDATE, time, value.Pass())); |
84 } | 84 } |
85 | 85 |
86 } // namespace util | 86 } // namespace util |
87 } // namespace performance_monitor | 87 } // namespace performance_monitor |
OLD | NEW |