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

Unified Diff: webkit/browser/fileapi/file_system_url_request_job_factory.cc

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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
Index: webkit/browser/fileapi/file_system_url_request_job_factory.cc
diff --git a/webkit/browser/fileapi/file_system_url_request_job_factory.cc b/webkit/browser/fileapi/file_system_url_request_job_factory.cc
deleted file mode 100644
index 3add372e5e647eb9413171c6fc53bf021c8a5915..0000000000000000000000000000000000000000
--- a/webkit/browser/fileapi/file_system_url_request_job_factory.cc
+++ /dev/null
@@ -1,73 +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.
-
-#include "webkit/browser/fileapi/file_system_url_request_job_factory.h"
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "net/url_request/url_request.h"
-#include "webkit/browser/fileapi/file_system_dir_url_request_job.h"
-#include "webkit/browser/fileapi/file_system_url_request_job.h"
-
-namespace fileapi {
-
-namespace {
-
-class FileSystemProtocolHandler
- : public net::URLRequestJobFactory::ProtocolHandler {
- public:
- FileSystemProtocolHandler(const std::string& storage_domain,
- FileSystemContext* context);
- virtual ~FileSystemProtocolHandler();
-
- virtual net::URLRequestJob* MaybeCreateJob(
- net::URLRequest* request,
- net::NetworkDelegate* network_delegate) const OVERRIDE;
-
- private:
- const std::string storage_domain_;
-
- // No scoped_refptr because |file_system_context_| is owned by the
- // ProfileIOData, which also owns this ProtocolHandler.
- FileSystemContext* const file_system_context_;
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemProtocolHandler);
-};
-
-FileSystemProtocolHandler::FileSystemProtocolHandler(
- const std::string& storage_domain,
- FileSystemContext* context)
- : storage_domain_(storage_domain),
- file_system_context_(context) {
- DCHECK(file_system_context_);
-}
-
-FileSystemProtocolHandler::~FileSystemProtocolHandler() {}
-
-net::URLRequestJob* FileSystemProtocolHandler::MaybeCreateJob(
- net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
- const std::string path = request->url().path();
-
- // If the path ends with a /, we know it's a directory. If the path refers
- // to a directory and gets dispatched to FileSystemURLRequestJob, that class
- // redirects back here, by adding a / to the URL.
- if (!path.empty() && path[path.size() - 1] == '/') {
- return new FileSystemDirURLRequestJob(
- request, network_delegate, storage_domain_, file_system_context_);
- }
- return new FileSystemURLRequestJob(
- request, network_delegate, storage_domain_, file_system_context_);
-}
-
-} // anonymous namespace
-
-net::URLRequestJobFactory::ProtocolHandler* CreateFileSystemProtocolHandler(
- const std::string& storage_domain, FileSystemContext* context) {
- DCHECK(context);
- return new FileSystemProtocolHandler(storage_domain, context);
-}
-
-} // namespace fileapi
« no previous file with comments | « webkit/browser/fileapi/file_system_url_request_job_factory.h ('k') | webkit/browser/fileapi/file_system_usage_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698