| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (!in_kiosk_mode) { | 326 if (!in_kiosk_mode) { |
| 327 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " | 327 LOG(ERROR) << "App with 'kiosk_only' attribute must be run in " |
| 328 << " ChromeOS kiosk mode."; | 328 << " ChromeOS kiosk mode."; |
| 329 NOTREACHED(); | 329 NOTREACHED(); |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 #if defined(OS_WIN) | 334 #if defined(OS_WIN) |
| 335 base::CommandLine::StringType about_blank_url( | 335 base::CommandLine::StringType about_blank_url( |
| 336 base::ASCIIToWide(url::kAboutBlankURL)); | 336 base::ASCIIToUTF16(url::kAboutBlankURL)); |
| 337 #else | 337 #else |
| 338 base::CommandLine::StringType about_blank_url(url::kAboutBlankURL); | 338 base::CommandLine::StringType about_blank_url(url::kAboutBlankURL); |
| 339 #endif | 339 #endif |
| 340 base::CommandLine::StringVector args = command_line.GetArgs(); | 340 base::CommandLine::StringVector args = command_line.GetArgs(); |
| 341 // Browser tests will add about:blank to the command line. This should | 341 // Browser tests will add about:blank to the command line. This should |
| 342 // never be interpreted as a file to open, as doing so with an app that | 342 // never be interpreted as a file to open, as doing so with an app that |
| 343 // has write access will result in a file 'about' being created, which | 343 // has write access will result in a file 'about' being created, which |
| 344 // causes problems on the bots. | 344 // causes problems on the bots. |
| 345 if (args.empty() || (command_line.HasSwitch(switches::kTestType) && | 345 if (args.empty() || (command_line.HasSwitch(switches::kTestType) && |
| 346 args[0] == about_blank_url)) { | 346 args[0] == about_blank_url)) { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 void LaunchPlatformAppWithUrl(Profile* profile, | 406 void LaunchPlatformAppWithUrl(Profile* profile, |
| 407 const Extension* extension, | 407 const Extension* extension, |
| 408 const std::string& handler_id, | 408 const std::string& handler_id, |
| 409 const GURL& url, | 409 const GURL& url, |
| 410 const GURL& referrer_url) { | 410 const GURL& referrer_url) { |
| 411 AppRuntimeEventRouter::DispatchOnLaunchedEventWithUrl( | 411 AppRuntimeEventRouter::DispatchOnLaunchedEventWithUrl( |
| 412 profile, extension, handler_id, url, referrer_url); | 412 profile, extension, handler_id, url, referrer_url); |
| 413 } | 413 } |
| 414 | 414 |
| 415 } // namespace apps | 415 } // namespace apps |
| OLD | NEW |