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

Side by Side Diff: chrome/browser/browser_init.cc

Issue 3012042: Revert 54560 - ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_init.h" 5 #include "chrome/browser/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); 625 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%");
626 #endif 626 #endif
627 GURL url(url_string); 627 GURL url(url_string);
628 628
629 // Restrict allowed URLs for --app switch. 629 // Restrict allowed URLs for --app switch.
630 if (!url.is_empty() && url.is_valid()) { 630 if (!url.is_empty() && url.is_valid()) {
631 ChildProcessSecurityPolicy *policy = 631 ChildProcessSecurityPolicy *policy =
632 ChildProcessSecurityPolicy::GetInstance(); 632 ChildProcessSecurityPolicy::GetInstance();
633 if (policy->IsWebSafeScheme(url.scheme()) || 633 if (policy->IsWebSafeScheme(url.scheme()) ||
634 url.SchemeIs(chrome::kFileScheme)) { 634 url.SchemeIs(chrome::kFileScheme)) {
635 Browser::OpenApplicationWindow(profile, url, NULL); 635 Browser::OpenApplicationWindow(profile, url);
636 return true; 636 return true;
637 } 637 }
638 } 638 }
639 return false; 639 return false;
640 } 640 }
641 641
642 void BrowserInit::LaunchWithProfile::ProcessLaunchURLs( 642 void BrowserInit::LaunchWithProfile::ProcessLaunchURLs(
643 bool process_startup, 643 bool process_startup,
644 const std::vector<GURL>& urls_to_open) { 644 const std::vector<GURL>& urls_to_open) {
645 if (process_startup && ProcessStartupURLs(urls_to_open)) { 645 if (process_startup && ProcessStartupURLs(urls_to_open)) {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 scoped_refptr<AutomationProviderClass> automation = 1053 scoped_refptr<AutomationProviderClass> automation =
1054 new AutomationProviderClass(profile); 1054 new AutomationProviderClass(profile);
1055 automation->ConnectToChannel(channel_id); 1055 automation->ConnectToChannel(channel_id);
1056 automation->SetExpectedTabCount(expected_tabs); 1056 automation->SetExpectedTabCount(expected_tabs);
1057 1057
1058 AutomationProviderList* list = 1058 AutomationProviderList* list =
1059 g_browser_process->InitAutomationProviderList(); 1059 g_browser_process->InitAutomationProviderList();
1060 DCHECK(list); 1060 DCHECK(list);
1061 list->AddProvider(automation); 1061 list->AddProvider(automation);
1062 } 1062 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/cocoa/tab_strip_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698