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

Side by Side Diff: chrome/browser/chromeos/drive/drive_url_request_job_unittest.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/drive/drive_url_request_job.h" 5 #include "chrome/browser/chromeos/drive/drive_url_request_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE { 55 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE {
56 return scheme == chrome::kDriveScheme; 56 return scheme == chrome::kDriveScheme;
57 } 57 }
58 58
59 virtual bool IsHandledURL(const GURL& url) const OVERRIDE { 59 virtual bool IsHandledURL(const GURL& url) const OVERRIDE {
60 return url.is_valid() && IsHandledProtocol(url.scheme()); 60 return url.is_valid() && IsHandledProtocol(url.scheme());
61 } 61 }
62 62
63 virtual bool IsSafeRedirectTarget(const GURL& location) const OVERRIDE {
64 return true;
65 }
66
63 private: 67 private:
64 const DriveURLRequestJob::FileSystemGetter file_system_getter_; 68 const DriveURLRequestJob::FileSystemGetter file_system_getter_;
65 scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_; 69 scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(TestURLRequestJobFactory); 71 DISALLOW_COPY_AND_ASSIGN(TestURLRequestJobFactory);
68 }; 72 };
69 73
70 class TestDelegate : public net::TestDelegate { 74 class TestDelegate : public net::TestDelegate {
71 public: 75 public:
72 TestDelegate() {} 76 TestDelegate() {}
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // Start the request, and cancel it immediately after it. 352 // Start the request, and cancel it immediately after it.
349 request.Start(); 353 request.Start();
350 request.Cancel(); 354 request.Cancel();
351 355
352 MessageLoop::current()->Run(); 356 MessageLoop::current()->Run();
353 357
354 EXPECT_EQ(net::URLRequestStatus::CANCELED, request.status().status()); 358 EXPECT_EQ(net::URLRequestStatus::CANCELED, request.status().status());
355 } 359 }
356 360
357 } // namespace drive 361 } // namespace drive
OLDNEW
« no previous file with comments | « android_webview/browser/net/aw_url_request_job_factory.cc ('k') | chrome/browser/custom_handlers/protocol_handler_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698