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

Unified Diff: chrome/browser/extensions/extension_webrequest_api_unittest.cc

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/extensions/extension_webrequest_api.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_webrequest_api_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_webrequest_api_unittest.cc (revision 92309)
+++ chrome/browser/extensions/extension_webrequest_api_unittest.cc (working copy)
@@ -24,14 +24,14 @@
namespace {
static void EventHandledOnIOThread(
- ProfileId profile_id,
+ void* profile,
const std::string& extension_id,
const std::string& event_name,
const std::string& sub_event_name,
uint64 request_id,
ExtensionWebRequestEventRouter::EventResponse* response) {
ExtensionWebRequestEventRouter::GetInstance()->OnEventHandled(
- profile_id, extension_id, event_name, sub_event_name, request_id,
+ profile, extension_id, event_name, sub_event_name, request_id,
response);
}
} // namespace
@@ -71,8 +71,7 @@
enable_referrers_.Init(
prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
network_delegate_.reset(new ChromeNetworkDelegate(
- event_router_.get(), NULL, profile_.GetRuntimeId(),
- &enable_referrers_));
+ event_router_.get(), NULL, &profile_, &enable_referrers_));
context_ = new TestURLRequestContext();
context_->set_network_delegate(network_delegate_.get());
}
@@ -98,13 +97,11 @@
const std::string kEventName(keys::kOnBeforeRequest);
base::WeakPtrFactory<TestIPCSender> ipc_sender_factory(&ipc_sender_);
ExtensionWebRequestEventRouter::GetInstance()->AddEventListener(
- profile_.GetRuntimeId(), extension1_id, kEventName,
- kEventName + "/1", filter,
+ &profile_, extension1_id, kEventName, kEventName + "/1", filter,
ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING,
ipc_sender_factory.GetWeakPtr());
ExtensionWebRequestEventRouter::GetInstance()->AddEventListener(
- profile_.GetRuntimeId(), extension2_id, kEventName,
- kEventName + "/2", filter,
+ &profile_, extension2_id, kEventName, kEventName + "/2", filter,
ExtensionWebRequestEventRouter::ExtraInfoSpec::BLOCKING,
ipc_sender_factory.GetWeakPtr());
@@ -125,8 +122,8 @@
response->cancel = true;
ipc_sender_.PushTask(
NewRunnableFunction(&EventHandledOnIOThread,
- profile_.GetRuntimeId(), extension1_id,
- kEventName, kEventName + "/1", request.identifier(), response));
+ &profile_, extension1_id, kEventName, kEventName + "/1",
+ request.identifier(), response));
// Extension2 response. Arrives second, and chosen because of install_time.
response = new ExtensionWebRequestEventRouter::EventResponse(
@@ -134,16 +131,16 @@
response->new_url = redirect_url;
ipc_sender_.PushTask(
NewRunnableFunction(&EventHandledOnIOThread,
- profile_.GetRuntimeId(), extension2_id,
- kEventName, kEventName + "/2", request.identifier(), response));
+ &profile_, extension2_id, kEventName, kEventName + "/2",
+ request.identifier(), response));
// Extension2 response to the redirected URL. Arrives first, and chosen.
response = new ExtensionWebRequestEventRouter::EventResponse(
extension2_id, base::Time::FromDoubleT(2));
ipc_sender_.PushTask(
NewRunnableFunction(&EventHandledOnIOThread,
- profile_.GetRuntimeId(), extension2_id,
- kEventName, kEventName + "/2", request.identifier(), response));
+ &profile_, extension2_id, kEventName, kEventName + "/2",
+ request.identifier(), response));
// Extension1 response to the redirected URL. Arrives second, and ignored.
response = new ExtensionWebRequestEventRouter::EventResponse(
@@ -151,8 +148,8 @@
response->cancel = true;
ipc_sender_.PushTask(
NewRunnableFunction(&EventHandledOnIOThread,
- profile_.GetRuntimeId(), extension1_id,
- kEventName, kEventName + "/1", request.identifier(), response));
+ &profile_, extension1_id, kEventName, kEventName + "/1",
+ request.identifier(), response));
request.Start();
MessageLoop::current()->Run();
« no previous file with comments | « chrome/browser/extensions/extension_webrequest_api.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698