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

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

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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 | « chrome/browser/plugin_data_remover_helper.cc ('k') | chrome/browser/plugin_prefs.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 CHROME_BROWSER_PLUGIN_PREFS_H_ 5 #ifndef CHROME_BROWSER_PLUGIN_PREFS_H_
6 #define CHROME_BROWSER_PLUGIN_PREFS_H_ 6 #define CHROME_BROWSER_PLUGIN_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 26 matching lines...) Expand all
37 class PluginPrefs : public RefcountedProfileKeyedService, 37 class PluginPrefs : public RefcountedProfileKeyedService,
38 public content::NotificationObserver { 38 public content::NotificationObserver {
39 public: 39 public:
40 enum PolicyStatus { 40 enum PolicyStatus {
41 NO_POLICY = 0, // Neither enabled or disabled by policy. 41 NO_POLICY = 0, // Neither enabled or disabled by policy.
42 POLICY_ENABLED, 42 POLICY_ENABLED,
43 POLICY_DISABLED, 43 POLICY_DISABLED,
44 }; 44 };
45 45
46 // Returns the instance associated with |profile|, creating it if necessary. 46 // Returns the instance associated with |profile|, creating it if necessary.
47 static PluginPrefs* GetForProfile(Profile* profile); 47 static scoped_refptr<PluginPrefs> GetForProfile(Profile* profile);
48 48
49 // Usually the PluginPrefs associated with a TestingProfile is NULL. 49 // Usually the PluginPrefs associated with a TestingProfile is NULL.
50 // This method overrides that for a given TestingProfile, returning the newly 50 // This method overrides that for a given TestingProfile, returning the newly
51 // created PluginPrefs object. 51 // created PluginPrefs object.
52 static PluginPrefs* GetForTestingProfile(Profile* profile); 52 static scoped_refptr<PluginPrefs> GetForTestingProfile(Profile* profile);
53 53
54 // Sets the plug-in list for tests. 54 // Sets the plug-in list for tests.
55 void SetPluginListForTesting(webkit::npapi::PluginList* plugin_list); 55 void SetPluginListForTesting(webkit::npapi::PluginList* plugin_list);
56 56
57 // Creates a new instance. This method should only be used for testing. 57 // Creates a new instance. This method should only be used for testing.
58 PluginPrefs(); 58 PluginPrefs();
59 59
60 // Associates this instance with |prefs|. This enables or disables 60 // Associates this instance with |prefs|. This enables or disables
61 // plugin groups as defined by the user's preferences. 61 // plugin groups as defined by the user's preferences.
62 // This method should only be called on the UI thread. 62 // This method should only be called on the UI thread.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // PluginList to use for testing. If this is NULL, defaults to the global 158 // PluginList to use for testing. If this is NULL, defaults to the global
159 // singleton. 159 // singleton.
160 webkit::npapi::PluginList* plugin_list_; 160 webkit::npapi::PluginList* plugin_list_;
161 161
162 PrefChangeRegistrar registrar_; 162 PrefChangeRegistrar registrar_;
163 163
164 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); 164 DISALLOW_COPY_AND_ASSIGN(PluginPrefs);
165 }; 165 };
166 166
167 #endif // CHROME_BROWSER_PLUGIN_PREFS_H_ 167 #endif // CHROME_BROWSER_PLUGIN_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugin_data_remover_helper.cc ('k') | chrome/browser/plugin_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698