| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |