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

Side by Side Diff: chrome/browser/chrome_site_per_process_browsertest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 bool has_user_gesture) override {} 384 bool has_user_gesture) override {}
385 385
386 scoped_refptr<shell_integration::DefaultProtocolClientWorker> 386 scoped_refptr<shell_integration::DefaultProtocolClientWorker>
387 CreateShellWorker( 387 CreateShellWorker(
388 const shell_integration::DefaultWebClientWorkerCallback& callback, 388 const shell_integration::DefaultWebClientWorkerCallback& callback,
389 const std::string& protocol) override { 389 const std::string& protocol) override {
390 return new shell_integration::DefaultProtocolClientWorker(callback, 390 return new shell_integration::DefaultProtocolClientWorker(callback,
391 protocol); 391 protocol);
392 } 392 }
393 393
394 ExternalProtocolHandler::BlockState GetBlockState( 394 ExternalProtocolHandler::BlockState GetBlockState(const std::string& scheme,
395 const std::string& scheme) override { 395 Profile* profile) override {
396 return ExternalProtocolHandler::DONT_BLOCK; 396 return ExternalProtocolHandler::DONT_BLOCK;
397 } 397 }
398 398
399 void BlockRequest() override {} 399 void BlockRequest() override {}
400 400
401 void LaunchUrlWithoutSecurityCheck( 401 void LaunchUrlWithoutSecurityCheck(
402 const GURL& url, 402 const GURL& url,
403 content::WebContents* web_contents) override { 403 content::WebContents* web_contents) override {
404 external_protocol_url_ = url; 404 external_protocol_url_ = url;
405 web_contents_ = web_contents; 405 web_contents_ = web_contents;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 "document.querySelector('iframe').src = '" + frame_url.spec() + "';\n" 502 "document.querySelector('iframe').src = '" + frame_url.spec() + "';\n"
503 "var w = window.open('about:blank');\n" 503 "var w = window.open('about:blank');\n"
504 "window.domAutomationController.send(!!w);\n", 504 "window.domAutomationController.send(!!w);\n",
505 &popup_handle_is_valid)); 505 &popup_handle_is_valid));
506 popup_observer.Wait(); 506 popup_observer.Wait();
507 507
508 // The popup shouldn't be blocked. 508 // The popup shouldn't be blocked.
509 EXPECT_TRUE(popup_handle_is_valid); 509 EXPECT_TRUE(popup_handle_is_valid);
510 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 510 ASSERT_EQ(2, browser()->tab_strip_model()->count());
511 } 511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698