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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.h

Issue 13548005: Add UMA reporting on failure to load ppapi plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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
« no previous file with comments | « no previous file | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class PpapiWebKitPlatformSupportImpl; 42 class PpapiWebKitPlatformSupportImpl;
43 43
44 class PpapiThread : public ChildThread, 44 class PpapiThread : public ChildThread,
45 public ppapi::proxy::PluginDispatcher::PluginDelegate, 45 public ppapi::proxy::PluginDispatcher::PluginDelegate,
46 public ppapi::proxy::PluginProxyDelegate { 46 public ppapi::proxy::PluginProxyDelegate {
47 public: 47 public:
48 PpapiThread(const CommandLine& command_line, bool is_broker); 48 PpapiThread(const CommandLine& command_line, bool is_broker);
49 virtual ~PpapiThread(); 49 virtual ~PpapiThread();
50 50
51 private: 51 private:
52 // Make sure the enum list in tools/histogram/histograms.xml is updated with
53 // any change in this list.
54 enum LoadResult {
55 LOAD_SUCCESS,
56 LOAD_FAILED,
57 ENTRY_POINT_MISSING,
58 INIT_FAILED,
59 // NOTE: Add new values only immediately above this line.
60 LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION.
61 };
62
52 // This class finds the target PluginDispatcher for each message it receives 63 // This class finds the target PluginDispatcher for each message it receives
53 // and forwards the message. 64 // and forwards the message.
54 class DispatcherMessageListener : public IPC::Listener { 65 class DispatcherMessageListener : public IPC::Listener {
55 public: 66 public:
56 explicit DispatcherMessageListener(PpapiThread* owner); 67 explicit DispatcherMessageListener(PpapiThread* owner);
57 virtual ~DispatcherMessageListener(); 68 virtual ~DispatcherMessageListener();
58 69
59 // IPC::Listener implementation. 70 // IPC::Listener implementation.
60 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 71 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
61 72
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Sets up the channel to the given renderer. On success, returns true and 117 // Sets up the channel to the given renderer. On success, returns true and
107 // fills the given ChannelHandle with the information from the new channel. 118 // fills the given ChannelHandle with the information from the new channel.
108 bool SetupRendererChannel(base::ProcessId renderer_pid, 119 bool SetupRendererChannel(base::ProcessId renderer_pid,
109 int renderer_child_id, 120 int renderer_child_id,
110 bool incognito, 121 bool incognito,
111 IPC::ChannelHandle* handle); 122 IPC::ChannelHandle* handle);
112 123
113 // Sets up the name of the plugin for logging using the given path. 124 // Sets up the name of the plugin for logging using the given path.
114 void SavePluginName(const base::FilePath& path); 125 void SavePluginName(const base::FilePath& path);
115 126
127 void ReportLoadResult(const base::FilePath& path, LoadResult result);
128
116 // True if running in a broker process rather than a normal plugin process. 129 // True if running in a broker process rather than a normal plugin process.
117 bool is_broker_; 130 bool is_broker_;
118 131
119 base::ScopedNativeLibrary library_; 132 base::ScopedNativeLibrary library_;
120 133
121 ppapi::PpapiPermissions permissions_; 134 ppapi::PpapiPermissions permissions_;
122 135
123 // Global state tracking for the proxy. 136 // Global state tracking for the proxy.
124 ppapi::proxy::PluginGlobals plugin_globals_; 137 ppapi::proxy::PluginGlobals plugin_globals_;
125 138
(...skipping 28 matching lines...) Expand all
154 #endif 167 #endif
155 168
156 DispatcherMessageListener dispatcher_message_listener_; 169 DispatcherMessageListener dispatcher_message_listener_;
157 170
158 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); 171 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
159 }; 172 };
160 173
161 } // namespace content 174 } // namespace content
162 175
163 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ 176 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698