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

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

Issue 10703078: Add Unclean Exit Watching to CPM (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_crash_event_watching
Patch Set: Requested changes made Created 8 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
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 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_EVENT_H_ 5 #ifndef CHROME_BROWSER_PERFORMANCE_MONITOR_EVENT_H_
6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_EVENT_H_ 6 #define CHROME_BROWSER_PERFORMANCE_MONITOR_EVENT_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace performance_monitor { 12 namespace performance_monitor {
13 13
14 // IMPORTANT: This is used as an indication of the event type within the 14 // IMPORTANT: This is used as an indication of the event type within the
15 // performance monitor database; do not change the order! If you add new events 15 // performance monitor database; do not change the order! If you add new events
16 // to this list, place them above EVENT_NUMBER_OF_EVENTS and add a string to 16 // to this list, place them above EVENT_NUMBER_OF_EVENTS and add a string to
17 // kEventTypeNames in the cc file. 17 // kEventTypeNames in the cc file.
18 enum EventType { 18 enum EventType {
19 EVENT_UNDEFINED, 19 EVENT_UNDEFINED,
20 EVENT_EXTENSION_INSTALL, 20 EVENT_EXTENSION_INSTALL,
21 EVENT_EXTENSION_UNINSTALL, 21 EVENT_EXTENSION_UNINSTALL,
22 EVENT_EXTENSION_UPDATE, 22 EVENT_EXTENSION_UPDATE,
23 EVENT_EXTENSION_ENABLE, 23 EVENT_EXTENSION_ENABLE,
24 EVENT_EXTENSION_UNLOAD, 24 EVENT_EXTENSION_UNLOAD,
25 EVENT_CHROME_UPDATE, 25 EVENT_CHROME_UPDATE,
26 EVENT_RENDERER_FREEZE, 26 EVENT_RENDERER_FREEZE,
27 EVENT_RENDERER_CRASH, 27 EVENT_RENDERER_CRASH,
28 EVENT_KILLED_BY_OS_CRASH, 28 EVENT_KILLED_BY_OS_CRASH,
29 EVENT_UNCLEAN_SHUTDOWN, 29 EVENT_UNCLEAN_EXIT,
30 EVENT_NUMBER_OF_EVENTS 30 EVENT_NUMBER_OF_EVENTS
31 }; 31 };
32 32
33 const char* EventTypeToString(EventType event_type); 33 const char* EventTypeToString(EventType event_type);
34 34
35 // The wrapper class for the JSON-generated event classes for the performance 35 // The wrapper class for the JSON-generated event classes for the performance
36 // monitor. This class is used so we can pass around events in a single class, 36 // monitor. This class is used so we can pass around events in a single class,
37 // rather than having a variety of different types (since JSON does not 37 // rather than having a variety of different types (since JSON does not
38 // currently support inheritance). Since the class will occasionally need to 38 // currently support inheritance). Since the class will occasionally need to
39 // be compared against other events, we construct it with type and time. Other 39 // be compared against other events, we construct it with type and time. Other
(...skipping 22 matching lines...) Expand all
62 // The time at which the event was recorded. 62 // The time at which the event was recorded.
63 base::Time time_; 63 base::Time time_;
64 // The full JSON-generated value representing the information of the event; 64 // The full JSON-generated value representing the information of the event;
65 // these data are described in chrome/browser/performance_monitor/events.json. 65 // these data are described in chrome/browser/performance_monitor/events.json.
66 scoped_ptr<base::DictionaryValue> data_; 66 scoped_ptr<base::DictionaryValue> data_;
67 }; 67 };
68 68
69 } // namespace performance_monitor 69 } // namespace performance_monitor
70 70
71 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_EVENT_H_ 71 #endif // CHROME_BROWSER_PERFORMANCE_MONITOR_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698