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

Side by Side Diff: webkit/tools/test_shell/test_shell.cc

Issue 10700117: Replaced static URLRequestFileJob factory with non-static protocol handler for File jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_file_job.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #undef LOG 5 #undef LOG
6 6
7 #include "webkit/tools/test_shell/test_shell.h" 7 #include "webkit/tools/test_shell/test_shell.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 FilePath path; 87 FilePath path;
88 PathService::Get(base::DIR_EXE, &path); 88 PathService::Get(base::DIR_EXE, &path);
89 path = path.AppendASCII("resources"); 89 path = path.AppendASCII("resources");
90 path = path.AppendASCII("inspector"); 90 path = path.AppendASCII("inspector");
91 path = path.AppendASCII(request->url().path().substr(1)); 91 path = path.AppendASCII(request->url().path().substr(1));
92 return new URLRequestTestShellFileJob(request, path); 92 return new URLRequestTestShellFileJob(request, path);
93 } 93 }
94 94
95 private: 95 private:
96 URLRequestTestShellFileJob(net::URLRequest* request, const FilePath& path) 96 URLRequestTestShellFileJob(net::URLRequest* request, const FilePath& path)
97 : net::URLRequestFileJob(request, path) { 97 : net::URLRequestFileJob(request,
98 path,
99 request->context()->network_delegate()) {
98 } 100 }
99 virtual ~URLRequestTestShellFileJob() { } 101 virtual ~URLRequestTestShellFileJob() { }
100 102
101 DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob); 103 DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob);
102 }; 104 };
103 105
104 106
105 } // namespace 107 } // namespace
106 108
107 // Initialize static member variable 109 // Initialize static member variable
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 return device_orientation_client_mock_.get(); 613 return device_orientation_client_mock_.get();
612 } 614 }
613 615
614 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { 616 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() {
615 if (!geolocation_client_mock_.get()) { 617 if (!geolocation_client_mock_.get()) {
616 geolocation_client_mock_.reset( 618 geolocation_client_mock_.reset(
617 WebKit::WebGeolocationClientMock::create()); 619 WebKit::WebGeolocationClientMock::create());
618 } 620 }
619 return geolocation_client_mock_.get(); 621 return geolocation_client_mock_.get();
620 } 622 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_file_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698