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

Side by Side Diff: chrome/browser/prerender/prerender_test_utils.cc

Issue 2623033006: [Re-landing] Migrate external protocol prefs from local state to profiles (Closed)
Patch Set: rebase Created 3 years, 10 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
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 #include "chrome/browser/prerender/prerender_test_utils.h" 5 #include "chrome/browser/prerender/prerender_test_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 scoped_refptr<shell_integration::DefaultProtocolClientWorker> 217 scoped_refptr<shell_integration::DefaultProtocolClientWorker>
218 CreateShellWorker( 218 CreateShellWorker(
219 const shell_integration::DefaultWebClientWorkerCallback& callback, 219 const shell_integration::DefaultWebClientWorkerCallback& callback,
220 const std::string& protocol) override { 220 const std::string& protocol) override {
221 NOTREACHED(); 221 NOTREACHED();
222 // This will crash, but it shouldn't get this far with BlockState::BLOCK 222 // This will crash, but it shouldn't get this far with BlockState::BLOCK
223 // anyway. 223 // anyway.
224 return nullptr; 224 return nullptr;
225 } 225 }
226 226
227 ExternalProtocolHandler::BlockState GetBlockState( 227 ExternalProtocolHandler::BlockState GetBlockState(const std::string& scheme,
228 const std::string& scheme) override { 228 Profile* profile) override {
229 // Block everything and fail the test. 229 // Block everything and fail the test.
230 ADD_FAILURE(); 230 ADD_FAILURE();
231 return ExternalProtocolHandler::BLOCK; 231 return ExternalProtocolHandler::BLOCK;
232 } 232 }
233 233
234 void BlockRequest() override {} 234 void BlockRequest() override {}
235 235
236 void RunExternalProtocolDialog(const GURL& url, 236 void RunExternalProtocolDialog(const GURL& url,
237 int render_process_host_id, 237 int render_process_host_id,
238 int routing_id, 238 int routing_id,
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 805 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
806 std::unique_ptr<net::URLRequestInterceptor> interceptor( 806 std::unique_ptr<net::URLRequestInterceptor> interceptor(
807 new HangingFirstRequestInterceptor(file, callback)); 807 new HangingFirstRequestInterceptor(file, callback));
808 net::URLRequestFilter::GetInstance()->AddUrlInterceptor( 808 net::URLRequestFilter::GetInstance()->AddUrlInterceptor(
809 url, std::move(interceptor)); 809 url, std::move(interceptor));
810 } 810 }
811 811
812 } // namespace test_utils 812 } // namespace test_utils
813 813
814 } // namespace prerender 814 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/external_protocol/external_protocol_handler_unittest.cc ('k') | chrome/browser/profiles/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698