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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 6fea215761220057a482221095c7a02f8f715980..403ee9e8e966714c9ca7555a2fbf91901f94462c 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -37,6 +37,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/extension_tab_util.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/extension_warning_set.h"
#include "chrome/browser/extensions/lazy_background_task_queue.h"
#include "chrome/browser/extensions/management_policy.h"
@@ -209,13 +210,13 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
extension_data->SetBoolean("terminated",
extension_service_->terminated_extensions()->Contains(extension->id()));
extension_data->SetBoolean("enabledIncognito",
- extension_service_->IsIncognitoEnabled(extension->id()));
+ extension_util::IsIncognitoEnabled(extension->id(), extension_service_));
extension_data->SetBoolean("incognitoCanBeToggled",
extension->can_be_incognito_enabled() &&
!extension->force_incognito_enabled());
extension_data->SetBoolean("wantsFileAccess", extension->wants_file_access());
extension_data->SetBoolean("allowFileAccess",
- extension_service_->AllowFileAccess(extension));
+ extension_util::AllowFileAccess(extension, extension_service_));
extension_data->SetBoolean("allow_reload",
Manifest::IsUnpackedLocation(extension->location()));
extension_data->SetBoolean("is_hosted_app", extension->is_hosted_app());
@@ -861,8 +862,9 @@ void ExtensionSettingsHandler::HandleEnableIncognitoMessage(
// Bug: http://crbug.com/41384
base::AutoReset<bool> auto_reset_ignore_notifications(
&ignore_notifications_, true);
- extension_service_->SetIsIncognitoEnabled(extension->id(),
- enable_str == "true");
+ extension_util::SetIsIncognitoEnabled(extension->id(),
+ extension_service_,
+ enable_str == "true");
}
void ExtensionSettingsHandler::HandleAllowFileAccessMessage(
@@ -883,7 +885,8 @@ void ExtensionSettingsHandler::HandleAllowFileAccessMessage(
return;
}
- extension_service_->SetAllowFileAccess(extension, allow_str == "true");
+ extension_util::SetAllowFileAccess(
+ extension, extension_service_, allow_str == "true");
}
void ExtensionSettingsHandler::HandleUninstallMessage(
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698