#include "base/command_line.h"
#include "base/memory/singleton.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
-#include "chrome/browser/extensions/extensions_quota_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/api/test.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/extension_system.h"
+#include "extensions/browser/quota_service.h"
namespace {
bool TestNotifyPassFunction::RunImpl() {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_PASSED,
- content::Source<Profile>(dispatcher()->profile()),
+ content::Source<content::BrowserContext>(dispatcher()->browser_context()),
content::NotificationService::NoDetails());
return true;
}
EXTENSION_FUNCTION_VALIDATE(params.get());
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_FAILED,
- content::Source<Profile>(dispatcher()->profile()),
+ content::Source<content::BrowserContext>(dispatcher()->browser_context()),
content::Details<std::string>(¶ms->message));
return true;
}
TestResetQuotaFunction::~TestResetQuotaFunction() {}
bool TestResetQuotaFunction::RunImpl() {
- ExtensionService* service = GetProfile()->GetExtensionService();
- ExtensionsQuotaService* quota = service->quota_service();
+ QuotaService* quota = ExtensionSystem::Get(GetProfile())->quota_service();
quota->Purge();
quota->violation_errors_.clear();
return true;
scoped_ptr<PassMessage::Params> params(
PassMessage::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
- AddRef(); // balanced in Reply
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
content::Source<TestSendMessageFunction>(this),
void TestSendMessageFunction::Reply(const std::string& message) {
SetResult(new base::StringValue(message));
SendResponse(true);
- Release(); // balanced in RunImpl
}
// static