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

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: Wrote test Created 8 years, 6 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 const std::string& pref_key, 390 const std::string& pref_key,
391 ExtensionPrefsScope scope); 391 ExtensionPrefsScope scope);
392 392
393 // Returns true if currently no extension with higher precedence controls the 393 // Returns true if currently no extension with higher precedence controls the
394 // preference. 394 // preference.
395 bool CanExtensionControlPref(const std::string& extension_id, 395 bool CanExtensionControlPref(const std::string& extension_id,
396 const std::string& pref_key, 396 const std::string& pref_key,
397 bool incognito); 397 bool incognito);
398 398
399 // Returns true if extension |extension_id| currently controls the 399 // Returns true if extension |extension_id| currently controls the
400 // preference. 400 // preference. If |from_incognito| is not NULL, looks at incognito preferences
401 // first, and |from_incognito| is set to true if the effective pref value is
402 // coming from the incognito preferences, false if it is coming from the
403 // normal ones.
401 bool DoesExtensionControlPref(const std::string& extension_id, 404 bool DoesExtensionControlPref(const std::string& extension_id,
402 const std::string& pref_key, 405 const std::string& pref_key,
403 bool incognito); 406 bool* from_incognito);
404 407
405 // Returns true if there is an extension which controls the preference value 408 // Returns true if there is an extension which controls the preference value
406 // for |pref_key| *and* it is specific to incognito mode. 409 // for |pref_key| *and* it is specific to incognito mode.
407 bool HasIncognitoPrefValue(const std::string& pref_key); 410 bool HasIncognitoPrefValue(const std::string& pref_key);
408 411
409 // Clears incognito session-only content settings for all extensions. 412 // Clears incognito session-only content settings for all extensions.
410 void ClearIncognitoSessionOnlyContentSettings(); 413 void ClearIncognitoSessionOnlyContentSettings();
411 414
412 // Returns true if the extension was installed from the Chrome Web Store. 415 // Returns true if the extension was installed from the Chrome Web Store.
413 bool IsFromWebStore(const std::string& extension_id) const; 416 bool IsFromWebStore(const std::string& extension_id) const;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Contains all the logic for handling the order for various extension 560 // Contains all the logic for handling the order for various extension
558 // properties. 561 // properties.
559 scoped_ptr<ExtensionSorting> extension_sorting_; 562 scoped_ptr<ExtensionSorting> extension_sorting_;
560 563
561 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; 564 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_;
562 565
563 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 566 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
564 }; 567 };
565 568
566 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 569 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698