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

Side by Side Diff: chrome/browser/plugin_updater.h

Issue 5516004: Clean up PluginGroup and related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_PLUGIN_UPDATER_H_ 5 #ifndef CHROME_BROWSER_PLUGIN_UPDATER_H_
6 #define CHROME_BROWSER_PLUGIN_UPDATER_H_ 6 #define CHROME_BROWSER_PLUGIN_UPDATER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector>
10
9 #include "base/basictypes.h" 11 #include "base/basictypes.h"
10 #include "base/file_path.h" 12 #include "base/file_path.h"
11 #include "base/singleton.h" 13 #include "base/singleton.h"
12 #include "chrome/common/notification_observer.h" 14 #include "chrome/common/notification_observer.h"
13 #include "webkit/glue/plugins/plugin_list.h" 15 #include "webkit/glue/plugins/plugin_list.h"
14 16
15 class DictionaryValue; 17 class DictionaryValue;
16 class ListValue; 18 class ListValue;
17 class NotificationDetails; 19 class NotificationDetails;
18 class NotificationSource; 20 class NotificationSource;
(...skipping 28 matching lines...) Expand all
47 49
48 private: 50 private:
49 PluginUpdater(); 51 PluginUpdater();
50 virtual ~PluginUpdater() {} 52 virtual ~PluginUpdater() {}
51 53
52 // Called on the file thread to get the data necessary to update the saved 54 // Called on the file thread to get the data necessary to update the saved
53 // preferences. The profile pointer is only to be passed to the UI thread. 55 // preferences. The profile pointer is only to be passed to the UI thread.
54 static void GetPreferencesDataOnFileThread(void* profile); 56 static void GetPreferencesDataOnFileThread(void* profile);
55 57
56 // Called on the UI thread with the plugin data to save the preferences. 58 // Called on the UI thread with the plugin data to save the preferences.
57 static void OnUpdatePreferences(Profile* profile, 59 static void OnUpdatePreferences(
58 const std::vector<WebPluginInfo>& plugins, 60 Profile* profile,
59 const NPAPI::PluginList::PluginMap& groups); 61 const std::vector<WebPluginInfo>& plugins,
62 const std::vector<PluginGroup>& groups);
60 63
61 // Queues sending the notification that plugin data has changed. This is done 64 // Queues sending the notification that plugin data has changed. This is done
62 // so that if a bunch of changes happen, we only send one notification. 65 // so that if a bunch of changes happen, we only send one notification.
63 void NotifyPluginStatusChanged(); 66 void NotifyPluginStatusChanged();
64 67
65 // Used for the post task to notify that plugin enabled status changed. 68 // Used for the post task to notify that plugin enabled status changed.
66 static void OnNotifyPluginStatusChanged(); 69 static void OnNotifyPluginStatusChanged();
67 70
68 static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin); 71 static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin);
69 72
70 // Force plugins to be disabled due to policy. |plugins| contains 73 // Force plugins to be disabled due to policy. |plugins| contains
71 // the list of StringValues of the names of the policy-disabled plugins. 74 // the list of StringValues of the names of the policy-disabled plugins.
72 void DisablePluginsFromPolicy(const ListValue* plugin_names); 75 void DisablePluginsFromPolicy(const ListValue* plugin_names);
73 76
74 // Needed to allow singleton instantiation using private constructor. 77 // Needed to allow singleton instantiation using private constructor.
75 friend struct DefaultSingletonTraits<PluginUpdater>; 78 friend struct DefaultSingletonTraits<PluginUpdater>;
76 79
77 // Note: if you change this to false from true, you must update 80 // Note: if you change this to false from true, you must update
78 // kPluginsEnabledInternalPDF to be a new name (i.e. add 2, 3, 4...) at end. 81 // kPluginsEnabledInternalPDF to be a new name (i.e. add 2, 3, 4...) at end.
79 bool enable_internal_pdf_; 82 bool enable_internal_pdf_;
80 83
81 bool notify_pending_; 84 bool notify_pending_;
82 85
83 DISALLOW_COPY_AND_ASSIGN(PluginUpdater); 86 DISALLOW_COPY_AND_ASSIGN(PluginUpdater);
84 }; 87 };
85 88
86 #endif // CHROME_BROWSER_PLUGIN_UPDATER_H_ 89 #endif // CHROME_BROWSER_PLUGIN_UPDATER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698