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

Side by Side Diff: chrome/renderer/plugins/plugin_uma.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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
« no previous file with comments | « chrome/common/mac/launchd.mm ('k') | chrome/renderer/plugins/plugin_uma.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) 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 <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Returns singleton instance. 52 // Returns singleton instance.
53 static PluginUMAReporter* GetInstance(); 53 static PluginUMAReporter* GetInstance();
54 54
55 void ReportPluginMissing(const std::string& plugin_mime_type, 55 void ReportPluginMissing(const std::string& plugin_mime_type,
56 const GURL& plugin_src); 56 const GURL& plugin_src);
57 57
58 void ReportPluginDisabled(const std::string& plugin_mime_type, 58 void ReportPluginDisabled(const std::string& plugin_mime_type,
59 const GURL& plugin_src); 59 const GURL& plugin_src);
60 60
61 private: 61 private:
62 friend struct DefaultSingletonTraits<PluginUMAReporter>; 62 friend struct base::DefaultSingletonTraits<PluginUMAReporter>;
63 friend class PluginUMATest; 63 friend class PluginUMATest;
64 64
65 PluginUMAReporter(); 65 PluginUMAReporter();
66 ~PluginUMAReporter(); 66 ~PluginUMAReporter();
67 67
68 static bool CompareCStrings(const char* first, const char* second); 68 static bool CompareCStrings(const char* first, const char* second);
69 bool CStringArrayContainsCString(const char* const* array, 69 bool CStringArrayContainsCString(const char* const* array,
70 size_t array_size, 70 size_t array_size,
71 const char* str); 71 const char* str);
72 // Extracts file extension from url. 72 // Extracts file extension from url.
73 void ExtractFileExtension(const GURL& src, std::string* extension); 73 void ExtractFileExtension(const GURL& src, std::string* extension);
74 74
75 PluginType GetPluginType(const std::string& plugin_mime_type, 75 PluginType GetPluginType(const std::string& plugin_mime_type,
76 const GURL& plugin_src); 76 const GURL& plugin_src);
77 77
78 // Converts plugin's src to plugin type. 78 // Converts plugin's src to plugin type.
79 PluginType SrcToPluginType(const GURL& src); 79 PluginType SrcToPluginType(const GURL& src);
80 // Converts plugin's mime type to plugin type. 80 // Converts plugin's mime type to plugin type.
81 PluginType MimeTypeToPluginType(const std::string& mime_type); 81 PluginType MimeTypeToPluginType(const std::string& mime_type);
82 82
83 scoped_ptr<UMASender> report_sender_; 83 scoped_ptr<UMASender> report_sender_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(PluginUMAReporter); 85 DISALLOW_COPY_AND_ASSIGN(PluginUMAReporter);
86 }; 86 };
87 87
88 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_ 88 #endif // CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_
OLDNEW
« no previous file with comments | « chrome/common/mac/launchd.mm ('k') | chrome/renderer/plugins/plugin_uma.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698