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

Side by Side Diff: chrome/browser/performance_monitor/event.cc

Issue 547063003: Remove the unmaintained performance monitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/performance_monitor/event.h"
6
7 #include "base/logging.h"
8
9 namespace performance_monitor {
10
11 Event::Event(const EventType& type,
12 const base::Time& time,
13 scoped_ptr<base::DictionaryValue> data)
14 : type_(type), time_(time), data_(data.release()) {
15 }
16
17 Event::~Event() {
18 }
19
20 scoped_ptr<Event> Event::FromValue(scoped_ptr<base::DictionaryValue> data) {
21 int type = 0;
22 if (!data->GetInteger(std::string("eventType"), &type))
23 return scoped_ptr<Event>();
24 double time = 0.0;
25 if (!data->GetDouble(std::string("time"), &time))
26 return scoped_ptr<Event>();
27 return scoped_ptr<Event>(new Event(static_cast<EventType>(type),
28 base::Time::FromInternalValue((int64)time),
29 data.Pass()));
30 }
31
32 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/performance_monitor/event.h ('k') | chrome/browser/performance_monitor/event_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698