summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_protocols.cc6
-rw-r--r--net/url_request/url_request_simple_job.cc12
-rw-r--r--net/url_request/url_request_simple_job.h12
-rw-r--r--webkit/appcache/view_appcache_internals_job.cc5
-rw-r--r--webkit/appcache/view_appcache_internals_job.h2
-rw-r--r--webkit/blob/view_blob_internals_job.cc4
-rw-r--r--webkit/blob/view_blob_internals_job.h2
7 files changed, 25 insertions, 18 deletions
diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc
index c42ae8d..2baf3f1 100644
--- a/chrome/browser/extensions/extension_protocols.cc
+++ b/chrome/browser/extensions/extension_protocols.cc
@@ -32,15 +32,15 @@
namespace {
-class URLRequestResourceBundleJob : public URLRequestSimpleJob {
+class URLRequestResourceBundleJob : public net::URLRequestSimpleJob {
public:
explicit URLRequestResourceBundleJob(net::URLRequest* request,
const FilePath& filename, int resource_id)
- : URLRequestSimpleJob(request),
+ : net::URLRequestSimpleJob(request),
filename_(filename),
resource_id_(resource_id) { }
- // URLRequestSimpleJob method.
+ // Overridden from URLRequestSimpleJob:
virtual bool GetData(std::string* mime_type,
std::string* charset,
std::string* data) const {
diff --git a/net/url_request/url_request_simple_job.cc b/net/url_request/url_request_simple_job.cc
index a6b0f5d..0b95d38 100644
--- a/net/url_request/url_request_simple_job.cc
+++ b/net/url_request/url_request_simple_job.cc
@@ -9,8 +9,10 @@
#include "net/base/net_errors.h"
#include "net/url_request/url_request_status.h"
-URLRequestSimpleJob::URLRequestSimpleJob(net::URLRequest* request)
- : net::URLRequestJob(request),
+namespace net {
+
+URLRequestSimpleJob::URLRequestSimpleJob(URLRequest* request)
+ : URLRequestJob(request),
data_offset_(0) {
}
@@ -31,7 +33,7 @@ bool URLRequestSimpleJob::GetCharset(std::string* charset) {
return true;
}
-bool URLRequestSimpleJob::ReadRawData(net::IOBuffer* buf, int buf_size,
+bool URLRequestSimpleJob::ReadRawData(IOBuffer* buf, int buf_size,
int* bytes_read) {
DCHECK(bytes_read);
int remaining = static_cast<int>(data_.size()) - data_offset_;
@@ -53,6 +55,8 @@ void URLRequestSimpleJob::StartAsync() {
} else {
// what should the error code be?
NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED,
- net::ERR_INVALID_URL));
+ ERR_INVALID_URL));
}
}
+
+} // namespace net
diff --git a/net/url_request/url_request_simple_job.h b/net/url_request/url_request_simple_job.h
index 877b0811a..7b48adb 100644
--- a/net/url_request/url_request_simple_job.h
+++ b/net/url_request/url_request_simple_job.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,15 +11,15 @@
#include "net/url_request/url_request_job.h"
namespace net {
+
class URLRequest;
-} // namespace net
-class URLRequestSimpleJob : public net::URLRequestJob {
+class URLRequestSimpleJob : public URLRequestJob {
public:
- explicit URLRequestSimpleJob(net::URLRequest* request);
+ explicit URLRequestSimpleJob(URLRequest* request);
virtual void Start();
- virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
+ virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read);
virtual bool GetMimeType(std::string* mime_type) const;
virtual bool GetCharset(std::string* charset);
@@ -41,4 +41,6 @@ class URLRequestSimpleJob : public net::URLRequestJob {
int data_offset_;
};
+} // namespace net
+
#endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
diff --git a/webkit/appcache/view_appcache_internals_job.cc b/webkit/appcache/view_appcache_internals_job.cc
index 7679dc8..12a2ab6 100644
--- a/webkit/appcache/view_appcache_internals_job.cc
+++ b/webkit/appcache/view_appcache_internals_job.cc
@@ -153,8 +153,9 @@ namespace appcache {
ViewAppCacheInternalsJob::ViewAppCacheInternalsJob(
net::URLRequest* request,
- AppCacheService* service) : URLRequestSimpleJob(request),
- appcache_service_(service) {
+ AppCacheService* service)
+ : net::URLRequestSimpleJob(request),
+ appcache_service_(service) {
}
ViewAppCacheInternalsJob::~ViewAppCacheInternalsJob() {
diff --git a/webkit/appcache/view_appcache_internals_job.h b/webkit/appcache/view_appcache_internals_job.h
index d9a705a..de2c736 100644
--- a/webkit/appcache/view_appcache_internals_job.h
+++ b/webkit/appcache/view_appcache_internals_job.h
@@ -18,7 +18,7 @@ namespace appcache {
// A job subclass that implements a protocol to inspect the internal
// state of appcache service.
-class ViewAppCacheInternalsJob : public URLRequestSimpleJob {
+class ViewAppCacheInternalsJob : public net::URLRequestSimpleJob {
public:
// Stores handle to appcache service for getting information.
ViewAppCacheInternalsJob(net::URLRequest* request, AppCacheService* service);
diff --git a/webkit/blob/view_blob_internals_job.cc b/webkit/blob/view_blob_internals_job.cc
index 49798b4..6c91f54 100644
--- a/webkit/blob/view_blob_internals_job.cc
+++ b/webkit/blob/view_blob_internals_job.cc
@@ -102,7 +102,7 @@ namespace webkit_blob {
ViewBlobInternalsJob::ViewBlobInternalsJob(
net::URLRequest* request, BlobStorageController* blob_storage_controller)
- : URLRequestSimpleJob(request),
+ : net::URLRequestSimpleJob(request),
blob_storage_controller_(blob_storage_controller),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
}
@@ -130,7 +130,7 @@ bool ViewBlobInternalsJob::IsRedirectResponse(GURL* location,
}
void ViewBlobInternalsJob::Kill() {
- URLRequestSimpleJob::Kill();
+ net::URLRequestSimpleJob::Kill();
method_factory_.RevokeAll();
}
diff --git a/webkit/blob/view_blob_internals_job.h b/webkit/blob/view_blob_internals_job.h
index 2f557ae..547bf40 100644
--- a/webkit/blob/view_blob_internals_job.h
+++ b/webkit/blob/view_blob_internals_job.h
@@ -21,7 +21,7 @@ class BlobStorageController;
// A job subclass that implements a protocol to inspect the internal
// state of blob registry.
-class ViewBlobInternalsJob : public URLRequestSimpleJob {
+class ViewBlobInternalsJob : public net::URLRequestSimpleJob {
public:
ViewBlobInternalsJob(net::URLRequest* request,
BlobStorageController* blob_storage_controller);