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

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

Issue 10559052: Split mode incognito extension can get misleading pref changed events from regular mode (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed some callbacks, other nits Created 8 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
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_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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 const std::string& pref_key, 375 const std::string& pref_key,
376 ExtensionPrefsScope scope); 376 ExtensionPrefsScope scope);
377 377
378 // Returns true if currently no extension with higher precedence controls the 378 // Returns true if currently no extension with higher precedence controls the
379 // preference. 379 // preference.
380 bool CanExtensionControlPref(const std::string& extension_id, 380 bool CanExtensionControlPref(const std::string& extension_id,
381 const std::string& pref_key, 381 const std::string& pref_key,
382 bool incognito); 382 bool incognito);
383 383
384 // Returns true if extension |extension_id| currently controls the 384 // Returns true if extension |extension_id| currently controls the
385 // preference. 385 // preference. If |from_incognito| is not NULL, looks at incognito preferences
386 // first, and |from_incognito| is set to true if the effective pref value is
387 // coming from the incognito preferences, false if it is coming from the
388 // normal ones.
386 bool DoesExtensionControlPref(const std::string& extension_id, 389 bool DoesExtensionControlPref(const std::string& extension_id,
387 const std::string& pref_key, 390 const std::string& pref_key,
388 bool incognito); 391 bool* from_incognito);
389 392
390 // Returns true if there is an extension which controls the preference value 393 // Returns true if there is an extension which controls the preference value
391 // for |pref_key| *and* it is specific to incognito mode. 394 // for |pref_key| *and* it is specific to incognito mode.
392 bool HasIncognitoPrefValue(const std::string& pref_key); 395 bool HasIncognitoPrefValue(const std::string& pref_key);
393 396
394 // Clears incognito session-only content settings for all extensions. 397 // Clears incognito session-only content settings for all extensions.
395 void ClearIncognitoSessionOnlyContentSettings(); 398 void ClearIncognitoSessionOnlyContentSettings();
396 399
397 // Returns true if the extension was installed from the Chrome Web Store. 400 // Returns true if the extension was installed from the Chrome Web Store.
398 bool IsFromWebStore(const std::string& extension_id) const; 401 bool IsFromWebStore(const std::string& extension_id) const;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 // Contains all the logic for handling the order for various extension 545 // Contains all the logic for handling the order for various extension
543 // properties. 546 // properties.
544 scoped_ptr<ExtensionSorting> extension_sorting_; 547 scoped_ptr<ExtensionSorting> extension_sorting_;
545 548
546 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; 549 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_;
547 550
548 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 551 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
549 }; 552 };
550 553
551 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 554 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_preference_helpers.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698