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

Unified Diff: chrome/renderer/plugin_uma.h

Issue 8461011: Clean up plug-in placeholders: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/custom_menu_commands.h ('k') | chrome/renderer/plugin_uma.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugin_uma.h
diff --git a/chrome/renderer/plugin_uma.h b/chrome/renderer/plugin_uma.h
deleted file mode 100644
index 411a8ae807ee007a000816388428fb7c5b8cc186..0000000000000000000000000000000000000000
--- a/chrome/renderer/plugin_uma.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_RENDERER_PLUGIN_UMA_H_
-#define CHROME_RENDERER_PLUGIN_UMA_H_
-
-#include <string>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/singleton.h"
-#include "googleurl/src/gurl.h"
-
-// Used to send UMA data about missing plugins to UMA histogram server. Method
-// ReportPluginMissing should be called whenever plugin that is not available or
-// enabled is called. We try to determine plugin's type by requested mime type,
-// or, if mime type is unknown, by plugin's src url.
-class MissingPluginReporter {
- public:
- // This must be sync'd with histogram values.
- enum PluginType {
- WINDOWS_MEDIA_PLAYER = 0,
- SILVERLIGHT = 1,
- REALPLAYER = 2,
- JAVA = 3,
- QUICKTIME = 4,
- OTHER = 5
- };
-
- // Sends UMA data, i.e. plugin's type.
- class UMASender {
- public:
- virtual ~UMASender() {}
- virtual void SendPluginUMA(PluginType plugin_type) = 0;
- };
-
- // Returns singleton instance.
- static MissingPluginReporter* GetInstance();
-
- void ReportPluginMissing(std::string plugin_mime_type,
- const GURL& plugin_src);
-
- // Used in testing.
- void SetUMASender(UMASender* sender);
-
- private:
- friend struct DefaultSingletonTraits<MissingPluginReporter>;
-
- MissingPluginReporter();
- ~MissingPluginReporter();
-
- static bool CompareCStrings(const char* first, const char* second);
- bool CStringArrayContainsCString(const char** array,
- size_t array_size,
- const char* str);
- // Extracts file extension from url.
- void ExtractFileExtension(const GURL& src, std::string* extension);
-
- // Converts plugin's src to plugin type.
- PluginType SrcToPluginType(const GURL& src);
- // Converts plugin's mime type to plugin type.
- PluginType MimeTypeToPluginType(const std::string& mime_type);
-
- scoped_ptr<UMASender> report_sender_;
-
- DISALLOW_COPY_AND_ASSIGN(MissingPluginReporter);
-};
-
-#endif // CHROME_RENDERER_PLUGIN_UMA_H_
-
« no previous file with comments | « chrome/renderer/custom_menu_commands.h ('k') | chrome/renderer/plugin_uma.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698