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

Side by Side Diff: chrome/browser/extensions/test_extension_prefs.h

Issue 8060017: Ensure that --disable-extensions disables extension prefs from being enacted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split ExtensionPrefs constructor into constructor and Init function Created 9 years, 2 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
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_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 Extension::Location location, 54 Extension::Location location,
55 int extra_flags); 55 int extra_flags);
56 56
57 // Similar to AddExtension, this adds a new test Extension. This is useful for 57 // Similar to AddExtension, this adds a new test Extension. This is useful for
58 // cases when you don't need the Extension object, but just the id it was 58 // cases when you don't need the Extension object, but just the id it was
59 // assigned. 59 // assigned.
60 std::string AddExtensionAndReturnId(std::string name); 60 std::string AddExtensionAndReturnId(std::string name);
61 61
62 PrefService* CreateIncognitoPrefService() const; 62 PrefService* CreateIncognitoPrefService() const;
63 63
64 // Allows disabling the loading of preferences of extensions. Becomes
65 // active after calling RecreateExtensionPrefs(). Defaults to false.
66 void set_extensions_disabled(bool extensions_disabled);
67
64 protected: 68 protected:
65 ScopedTempDir temp_dir_; 69 ScopedTempDir temp_dir_;
66 FilePath preferences_file_; 70 FilePath preferences_file_;
67 FilePath extensions_dir_; 71 FilePath extensions_dir_;
68 scoped_ptr<PrefService> pref_service_; 72 scoped_ptr<PrefService> pref_service_;
69 scoped_ptr<ExtensionPrefs> prefs_; 73 scoped_ptr<ExtensionPrefs> prefs_;
70 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; 74 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
71 75
72 private: 76 private:
77 bool extensions_disabled_;
73 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); 78 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs);
74 }; 79 };
75 80
76 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ 81 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/extensions/test_extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698