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

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: Windows compile 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 ExtensionService::IsIncognitoEnabled
Yoyo Zhou 2013/10/15 21:25:49 Comment needs to be updated.
benwells 2013/10/17 06:56:55 Done.
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.
Yoyo Zhou 2013/10/15 21:25:49 Probably should have a similar comment.
benwells 2013/10/17 06:56:55 Done.
379 bool AllowFileAccess(const std::string& extension_id); 379 bool AllowFileAccess(const std::string& extension_id) const;
380 void SetAllowFileAccess(const std::string& extension_id, bool allow); 380 void SetAllowFileAccess(const std::string& extension_id, bool allow);
381 bool HasAllowFileAccessSetting(const std::string& extension_id) const; 381 bool HasAllowFileAccessSetting(const std::string& extension_id) const;
382 382
383 // Get the launch type preference. If no preference is set, return 383 // Get the launch type preference. If no preference is set, return
384 // |default_pref_value|. 384 // |default_pref_value|.
385 LaunchType GetLaunchType(const Extension* extension, 385 LaunchType GetLaunchType(const Extension* extension,
386 LaunchType default_pref_value); 386 LaunchType default_pref_value);
387 387
388 void SetLaunchType(const std::string& extension_id, LaunchType launch_type); 388 void SetLaunchType(const std::string& extension_id, LaunchType launch_type);
389 389
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 scoped_ptr<TimeProvider> time_provider_; 632 scoped_ptr<TimeProvider> time_provider_;
633 633
634 bool extensions_disabled_; 634 bool extensions_disabled_;
635 635
636 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 636 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
637 }; 637 };
638 638
639 } // namespace extensions 639 } // namespace extensions
640 640
641 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 641 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698