summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoridanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 17:00:15 +0000
committeridanan@chromium.org <idanan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 17:00:15 +0000
commit9fa75843d1f81abc9c8bf445be16d6f28fbd3577 (patch)
tree644d8dcc391799c4855a7bf89de9e56df2460b95 /net
parent5e56a3a8e84ee5b4417077f5f3ec17b7dbe73bd1 (diff)
downloadchromium_src-9fa75843d1f81abc9c8bf445be16d6f28fbd3577.zip
chromium_src-9fa75843d1f81abc9c8bf445be16d6f28fbd3577.tar.gz
chromium_src-9fa75843d1f81abc9c8bf445be16d6f28fbd3577.tar.bz2
Return Error Status Upon Blocking Requests
Blocked requests now return an error status so that the Chrome throbber does not spin indefinitely when blocking URL requests. This code shall be replaced with resource substitution next but gives a better experience until then. Same goes for the added type-based interception. TEST=none BUG=16932 Review URL: http://codereview.chromium.org/159214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/url_request/url_request.cc4
-rw-r--r--net/url_request/url_request.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 18437ad..0f8ec34 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -475,14 +475,14 @@ int64 URLRequest::GetExpectedContentSize() const {
return expected_content_size;
}
-URLRequest::UserData* URLRequest::GetUserData(void* key) const {
+URLRequest::UserData* URLRequest::GetUserData(const void* key) const {
UserDataMap::const_iterator found = user_data_.find(key);
if (found != user_data_.end())
return found->second.get();
return NULL;
}
-void URLRequest::SetUserData(void* key, UserData* data) {
+void URLRequest::SetUserData(const void* key, UserData* data) {
user_data_[key] = linked_ptr<UserData>(data);
}
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 84da0cc..b52fa3b 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -212,8 +212,8 @@ class URLRequest {
// Multiple user data values can be stored under different keys.
// This request will TAKE OWNERSHIP of the given data pointer, and will
// delete the object if it is changed or the request is destroyed.
- UserData* GetUserData(void* key) const;
- void SetUserData(void* key, UserData* data);
+ UserData* GetUserData(const void* key) const;
+ void SetUserData(const void* key, UserData* data);
// Registers a new protocol handler for the given scheme. If the scheme is
// already handled, this will overwrite the given factory. To delete the
@@ -570,7 +570,7 @@ class URLRequest {
bool is_pending_;
// Externally-defined data accessible by key
- typedef std::map<void*, linked_ptr<UserData> > UserDataMap;
+ typedef std::map<const void*, linked_ptr<UserData> > UserDataMap;
UserDataMap user_data_;
// Whether to enable performance profiling on the job serving this request.