diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 01:56:03 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-15 01:56:03 +0000 |
commit | 869775519cdb261bc24bd01ddfbbc06f34f4a97a (patch) | |
tree | 3b9ea8290befc05e3799b669e447dd86a6d46d45 /net | |
parent | d277bb40a3190c5c1e10926ec35d8e19b8c01784 (diff) | |
download | chromium_src-869775519cdb261bc24bd01ddfbbc06f34f4a97a.zip chromium_src-869775519cdb261bc24bd01ddfbbc06f34f4a97a.tar.gz chromium_src-869775519cdb261bc24bd01ddfbbc06f34f4a97a.tar.bz2 |
net: Add namespace net to URLRequestSimpleJob.
BUG=64263
TEST=compiled locally and trybots
Review URL: http://codereview.chromium.org/5847001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/url_request/url_request_simple_job.cc | 12 | ||||
-rw-r--r-- | net/url_request/url_request_simple_job.h | 12 |
2 files changed, 15 insertions, 9 deletions
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_ |