| OLD | NEW |
| 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/ui/startup/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "apps/app_restore_service.h" | 10 #include "apps/app_restore_service.h" |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 #if defined(OS_WIN) // Fix up Windows shortcuts. | 535 #if defined(OS_WIN) // Fix up Windows shortcuts. |
| 536 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); | 536 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); |
| 537 #endif | 537 #endif |
| 538 GURL url(url_string); | 538 GURL url(url_string); |
| 539 | 539 |
| 540 // Restrict allowed URLs for --app switch. | 540 // Restrict allowed URLs for --app switch. |
| 541 if (!url.is_empty() && url.is_valid()) { | 541 if (!url.is_empty() && url.is_valid()) { |
| 542 ChildProcessSecurityPolicy* policy = | 542 ChildProcessSecurityPolicy* policy = |
| 543 ChildProcessSecurityPolicy::GetInstance(); | 543 ChildProcessSecurityPolicy::GetInstance(); |
| 544 if (policy->IsWebSafeScheme(url.scheme()) || | 544 if (policy->IsWebSafeScheme(url.scheme()) || |
| 545 url.SchemeIs(chrome::kFileScheme)) { | 545 url.SchemeIs(content::kFileScheme)) { |
| 546 const extensions::Extension* extension = | 546 const extensions::Extension* extension = |
| 547 profile->GetExtensionService()->GetInstalledApp(url); | 547 profile->GetExtensionService()->GetInstalledApp(url); |
| 548 if (extension) { | 548 if (extension) { |
| 549 RecordCmdLineAppHistogram(extension->GetType()); | 549 RecordCmdLineAppHistogram(extension->GetType()); |
| 550 } else { | 550 } else { |
| 551 CoreAppLauncherHandler::RecordAppLaunchType( | 551 CoreAppLauncherHandler::RecordAppLaunchType( |
| 552 extension_misc::APP_LAUNCH_CMD_LINE_APP_LEGACY, | 552 extension_misc::APP_LAUNCH_CMD_LINE_APP_LEGACY, |
| 553 extensions::Manifest::TYPE_HOSTED_APP); | 553 extensions::Manifest::TYPE_HOSTED_APP); |
| 554 } | 554 } |
| 555 | 555 |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 } | 986 } |
| 987 | 987 |
| 988 #if !defined(OS_WIN) | 988 #if !defined(OS_WIN) |
| 989 // static | 989 // static |
| 990 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( | 990 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( |
| 991 Profile* profile, | 991 Profile* profile, |
| 992 const std::vector<GURL>& startup_urls) { | 992 const std::vector<GURL>& startup_urls) { |
| 993 return false; | 993 return false; |
| 994 } | 994 } |
| 995 #endif | 995 #endif |
| OLD | NEW |