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

Unified Diff: chrome/browser/sync/test/integration/sync_extension_helper.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
Index: chrome/browser/sync/test/integration/sync_extension_helper.cc
diff --git a/chrome/browser/sync/test/integration/sync_extension_helper.cc b/chrome/browser/sync/test/integration/sync_extension_helper.cc
index 3e1c0d4cd1f729cac4f452b04efd1cf6ecffffe7..75a69e60fb7a56b51928a7c7298dc56325c5440e 100644
--- a/chrome/browser/sync/test/integration/sync_extension_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_extension_helper.cc
@@ -10,6 +10,7 @@
#include "base/values.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/pending_extension_info.h"
#include "chrome/browser/extensions/pending_extension_manager.h"
#include "chrome/browser/profiles/profile.h"
@@ -116,20 +117,20 @@ bool SyncExtensionHelper::IsExtensionEnabled(
void SyncExtensionHelper::IncognitoEnableExtension(
Profile* profile, const std::string& name) {
- profile->GetExtensionService()->SetIsIncognitoEnabled(
- extensions::id_util::GenerateId(name), true);
+ extension_util::SetIsIncognitoEnabled(extensions::id_util::GenerateId(name),
+ profile->GetExtensionService(), true);
}
void SyncExtensionHelper::IncognitoDisableExtension(
Profile* profile, const std::string& name) {
- profile->GetExtensionService()->SetIsIncognitoEnabled(
- extensions::id_util::GenerateId(name), false);
+ extension_util::SetIsIncognitoEnabled(extensions::id_util::GenerateId(name),
+ profile->GetExtensionService(), false);
}
bool SyncExtensionHelper::IsIncognitoEnabled(
Profile* profile, const std::string& name) const {
- return profile->GetExtensionService()->IsIncognitoEnabled(
- extensions::id_util::GenerateId(name));
+ return extension_util::IsIncognitoEnabled(
+ extensions::id_util::GenerateId(name), profile->GetExtensionService());
}
@@ -197,7 +198,7 @@ SyncExtensionHelper::ExtensionStateMap
ExtensionState::ENABLED :
ExtensionState::DISABLED;
extension_state_map[id].incognito_enabled =
- extension_service->IsIncognitoEnabled(id);
+ extension_util::IsIncognitoEnabled(id, extension_service);
DVLOG(2) << "Extension " << (*it)->id() << " in profile "
<< profile_debug_name << " is "
@@ -215,7 +216,7 @@ SyncExtensionHelper::ExtensionStateMap
for (id = pending_crx_ids.begin(); id != pending_crx_ids.end(); ++id) {
extension_state_map[*id].enabled_state = ExtensionState::PENDING;
extension_state_map[*id].incognito_enabled =
- extension_service->IsIncognitoEnabled(*id);
+ extension_util::IsIncognitoEnabled(*id, extension_service);
DVLOG(2) << "Extension " << *id << " in profile "
<< profile_debug_name << " is pending";
}
« no previous file with comments | « chrome/browser/extensions/user_script_master.cc ('k') | chrome/browser/ui/app_list/search/app_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698