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

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

Issue 1025613003: Fix for ERROR:url_pattern_set.cc(240)] Invalid url pattern: chrome://print/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 8 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
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_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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 scoped_refptr<Extension> AddExtensionWithManifestAndFlags( 71 scoped_refptr<Extension> AddExtensionWithManifestAndFlags(
72 const base::DictionaryValue& manifest, 72 const base::DictionaryValue& manifest,
73 Manifest::Location location, 73 Manifest::Location location,
74 int extra_flags); 74 int extra_flags);
75 75
76 // Similar to AddExtension, this adds a new test Extension. This is useful for 76 // Similar to AddExtension, this adds a new test Extension. This is useful for
77 // cases when you don't need the Extension object, but just the id it was 77 // cases when you don't need the Extension object, but just the id it was
78 // assigned. 78 // assigned.
79 std::string AddExtensionAndReturnId(const std::string& name); 79 std::string AddExtensionAndReturnId(const std::string& name);
80 80
81 // This will add extension in our ExtensionPrefs.
82 void AddExtension(Extension* extension);
83
81 PrefService* CreateIncognitoPrefService() const; 84 PrefService* CreateIncognitoPrefService() const;
82 85
83 // Allows disabling the loading of preferences of extensions. Becomes 86 // Allows disabling the loading of preferences of extensions. Becomes
84 // active after calling RecreateExtensionPrefs(). Defaults to false. 87 // active after calling RecreateExtensionPrefs(). Defaults to false.
85 void set_extensions_disabled(bool extensions_disabled); 88 void set_extensions_disabled(bool extensions_disabled);
86 89
87 protected: 90 protected:
88 base::ScopedTempDir temp_dir_; 91 base::ScopedTempDir temp_dir_;
89 base::FilePath preferences_file_; 92 base::FilePath preferences_file_;
90 base::FilePath extensions_dir_; 93 base::FilePath extensions_dir_;
91 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; 94 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_;
92 scoped_ptr<PrefServiceSyncable> pref_service_; 95 scoped_ptr<PrefServiceSyncable> pref_service_;
93 scoped_ptr<ExtensionPrefs> prefs_; 96 scoped_ptr<ExtensionPrefs> prefs_;
94 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; 97 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
95 const scoped_refptr<base::SequencedTaskRunner> task_runner_; 98 const scoped_refptr<base::SequencedTaskRunner> task_runner_;
96 99
97 private: 100 private:
98 bool extensions_disabled_; 101 bool extensions_disabled_;
99 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); 102 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs);
100 }; 103 };
101 104
102 } // namespace extensions 105 } // namespace extensions
103 106
104 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ 107 #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