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

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

Issue 25366003: Moved some functions off ExtensionService into a new file extension_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile failures Created 7 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) 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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 // Set/Get whether or not the app is active. Used to force a launch of apps 363 // Set/Get whether or not the app is active. Used to force a launch of apps
364 // that don't handle onRestarted() on a restart. We can only safely do that if 364 // that don't handle onRestarted() on a restart. We can only safely do that if
365 // the app was active when it was last running. 365 // the app was active when it was last running.
366 void SetIsActive(const std::string& extension_id, bool is_active); 366 void SetIsActive(const std::string& extension_id, bool is_active);
367 bool IsActive(const std::string& extension_id); 367 bool IsActive(const std::string& extension_id);
368 368
369 // Returns true if the user enabled this extension to be loaded in incognito 369 // Returns true if the user enabled this extension to be loaded in incognito
370 // mode. 370 // mode.
371 // 371 //
372 // IMPORTANT: you probably want to use ExtensionService::IsIncognitoEnabled 372 // IMPORTANT: you probably want to use extension_utils::IsIncognitoEnabled
373 // instead of this method. 373 // instead of this method.
374 bool IsIncognitoEnabled(const std::string& extension_id); 374 bool IsIncognitoEnabled(const std::string& extension_id) const;
375 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); 375 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled);
376 376
377 // Returns true if the user has chosen to allow this extension to inject 377 // Returns true if the user has chosen to allow this extension to inject
378 // scripts into pages with file URLs. 378 // scripts into pages with file URLs.
379 bool AllowFileAccess(const std::string& extension_id); 379 //
380 // IMPORTANT: you probably want to use extension_utils::AllowFileAccess
381 // instead of this method.
382 bool AllowFileAccess(const std::string& extension_id) const;
380 void SetAllowFileAccess(const std::string& extension_id, bool allow); 383 void SetAllowFileAccess(const std::string& extension_id, bool allow);
381 bool HasAllowFileAccessSetting(const std::string& extension_id) const; 384 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
382 385
383 // Get the launch type preference. If no preference is set, return 386 // Get the launch type preference. If no preference is set, return
384 // |default_pref_value|. 387 // |default_pref_value|.
385 LaunchType GetLaunchType(const Extension* extension, 388 LaunchType GetLaunchType(const Extension* extension,
386 LaunchType default_pref_value); 389 LaunchType default_pref_value);
387 390
388 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 391 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
389 392
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 scoped_ptr<TimeProvider> time_provider_; 635 scoped_ptr<TimeProvider> time_provider_;
633 636
634 bool extensions_disabled_; 637 bool extensions_disabled_;
635 638
636 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 639 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
637 }; 640 };
638 641
639 } // namespace extensions 642 } // namespace extensions
640 643
641 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 644 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_functional_browsertest.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698