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

Unified Diff: net/url_request/url_request_simple_job.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/url_request/url_request_redirect_job.cc ('k') | net/url_request/url_request_simple_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_simple_job.h
diff --git a/net/url_request/url_request_simple_job.h b/net/url_request/url_request_simple_job.h
deleted file mode 100644
index 4adabc1b5eab51d8d95db7291d676fb5c7573d41..0000000000000000000000000000000000000000
--- a/net/url_request/url_request_simple_job.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
-#define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/strings/string_piece.h"
-#include "net/base/completion_callback.h"
-#include "net/base/net_export.h"
-#include "net/url_request/url_range_request_job.h"
-
-namespace base {
-class RefCountedMemory;
-}
-
-namespace net {
-
-class URLRequest;
-
-class NET_EXPORT URLRequestSimpleJob : public URLRangeRequestJob {
- public:
- URLRequestSimpleJob(URLRequest* request, NetworkDelegate* network_delegate);
-
- void Start() override;
- bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
- bool GetMimeType(std::string* mime_type) const override;
- bool GetCharset(std::string* charset) override;
-
- protected:
- ~URLRequestSimpleJob() override;
-
- // Subclasses must override either GetData or GetRefCountedData to define the
- // way response data is determined.
- // The return value should be:
- // - OK if data is obtained;
- // - ERR_IO_PENDING if async processing is needed to finish obtaining data.
- // This is the only case when |callback| should be called after
- // completion of the operation. In other situations |callback| should
- // never be called;
- // - any other ERR_* code to indicate an error. This code will be used
- // as the error code in the URLRequestStatus when the URLRequest
- // is finished.
- virtual int GetData(std::string* mime_type,
- std::string* charset,
- std::string* data,
- const CompletionCallback& callback) const;
-
- // Similar to GetData(), except |*data| can share ownership of the bytes
- // instead of copying them into a std::string.
- virtual int GetRefCountedData(std::string* mime_type,
- std::string* charset,
- scoped_refptr<base::RefCountedMemory>* data,
- const CompletionCallback& callback) const;
-
- // Returns the task runner used by ReadRawData. This method is virtual so
- // that it can be overridden in tests.
- virtual base::TaskRunner* GetTaskRunner() const;
-
- void StartAsync();
-
- private:
- void OnGetDataCompleted(int result);
- void OnReadCompleted(int bytes_read);
-
- HttpByteRange byte_range_;
- std::string mime_type_;
- std::string charset_;
- scoped_refptr<base::RefCountedMemory> data_;
- int64 next_data_offset_;
- scoped_refptr<base::TaskRunner> task_runner_;
- base::WeakPtrFactory<URLRequestSimpleJob> weak_factory_;
-};
-
-} // namespace net
-
-#endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_
« no previous file with comments | « net/url_request/url_request_redirect_job.cc ('k') | net/url_request/url_request_simple_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698