OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_PLUGINS_PLUGIN_UMA_H_ | 5 #ifndef CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_ |
6 #define CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_ | 6 #define CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
| 12 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
12 #include "url/gurl.h" | 15 #include "url/gurl.h" |
13 | 16 |
14 // Used to send UMA data about missing plugins to UMA histogram server. Method | 17 // Used to send UMA data about missing plugins to UMA histogram server. Method |
15 // ReportPluginMissing should be called whenever plugin that is not available or | 18 // ReportPluginMissing should be called whenever plugin that is not available or |
16 // enabled is called. We try to determine plugin's type by requested mime type, | 19 // enabled is called. We try to determine plugin's type by requested mime type, |
17 // or, if mime type is unknown, by plugin's src url. | 20 // or, if mime type is unknown, by plugin's src url. |
18 class PluginUMAReporter { | 21 class PluginUMAReporter { |
19 public: | 22 public: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 PluginType SrcToPluginType(const GURL& src); | 82 PluginType SrcToPluginType(const GURL& src); |
80 // Converts plugin's mime type to plugin type. | 83 // Converts plugin's mime type to plugin type. |
81 PluginType MimeTypeToPluginType(const std::string& mime_type); | 84 PluginType MimeTypeToPluginType(const std::string& mime_type); |
82 | 85 |
83 scoped_ptr<UMASender> report_sender_; | 86 scoped_ptr<UMASender> report_sender_; |
84 | 87 |
85 DISALLOW_COPY_AND_ASSIGN(PluginUMAReporter); | 88 DISALLOW_COPY_AND_ASSIGN(PluginUMAReporter); |
86 }; | 89 }; |
87 | 90 |
88 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_ | 91 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_ |
OLD | NEW |