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

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

Issue 7275018: Make ExtensionContentSettingsStore refcounted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 5 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_EXTENSION_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // For unit testing. Enables injecting an artificial clock that is used 339 // For unit testing. Enables injecting an artificial clock that is used
340 // to query the current time, when an extension is installed. 340 // to query the current time, when an extension is installed.
341 virtual base::Time GetCurrentTime() const; 341 virtual base::Time GetCurrentTime() const;
342 342
343 private: 343 private:
344 // ExtensionContentSettingsStore::Observer methods: 344 // ExtensionContentSettingsStore::Observer methods:
345 virtual void OnContentSettingChanged( 345 virtual void OnContentSettingChanged(
346 const std::string& extension_id, 346 const std::string& extension_id,
347 bool incognito) OVERRIDE; 347 bool incognito) OVERRIDE;
348 348
349 virtual void OnDestruction() OVERRIDE {}
350
351 // Converts absolute paths in the pref to paths relative to the 349 // Converts absolute paths in the pref to paths relative to the
352 // install_directory_. 350 // install_directory_.
353 void MakePathsRelative(); 351 void MakePathsRelative();
354 352
355 // Converts internal relative paths to be absolute. Used for export to 353 // Converts internal relative paths to be absolute. Used for export to
356 // consumers who expect full paths. 354 // consumers who expect full paths.
357 void MakePathsAbsolute(DictionaryValue* dict); 355 void MakePathsAbsolute(DictionaryValue* dict);
358 356
359 // Sets the pref |key| for extension |id| to |value|. 357 // Sets the pref |key| for extension |id| to |value|.
360 void UpdateExtensionPref(const std::string& id, 358 void UpdateExtensionPref(const std::string& id,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 434
437 // The pref service specific to this set of extension prefs. Owned by profile. 435 // The pref service specific to this set of extension prefs. Owned by profile.
438 PrefService* prefs_; 436 PrefService* prefs_;
439 437
440 // Base extensions install directory. 438 // Base extensions install directory.
441 FilePath install_directory_; 439 FilePath install_directory_;
442 440
443 // Weak pointer, owned by Profile. 441 // Weak pointer, owned by Profile.
444 ExtensionPrefValueMap* extension_pref_value_map_; 442 ExtensionPrefValueMap* extension_pref_value_map_;
445 443
446 scoped_ptr<ExtensionContentSettingsStore> content_settings_store_; 444 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_;
447 445
448 // The URLs of all of the toolstrips. 446 // The URLs of all of the toolstrips.
449 URLList shelf_order_; 447 URLList shelf_order_;
450 448
451 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 449 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
452 }; 450 };
453 451
454 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 452 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_content_settings_store_unittest.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698