| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 417 |
| 418 // TODO(skerner): Could pass in |extension| and |launch_container|, | 418 // TODO(skerner): Could pass in |extension| and |launch_container|, |
| 419 // and avoid calling GetAppLaunchContainer() both here and in | 419 // and avoid calling GetAppLaunchContainer() both here and in |
| 420 // OpenApplicationTab(). | 420 // OpenApplicationTab(). |
| 421 | 421 |
| 422 if (launch_container == extension_misc::LAUNCH_TAB) | 422 if (launch_container == extension_misc::LAUNCH_TAB) |
| 423 return false; | 423 return false; |
| 424 | 424 |
| 425 RecordCmdLineAppHistogram(); | 425 RecordCmdLineAppHistogram(); |
| 426 WebContents* tab_in_app_window = Browser::OpenApplication( | 426 WebContents* tab_in_app_window = Browser::OpenApplication( |
| 427 profile, extension, launch_container, GURL(), NEW_WINDOW); | 427 profile, extension, launch_container, GURL(), NEW_WINDOW, |
| 428 &command_line_); |
| 428 // Platform apps fire off a launch event which may or may not open a window. | 429 // Platform apps fire off a launch event which may or may not open a window. |
| 429 return (tab_in_app_window != NULL || extension->is_platform_app()); | 430 return (tab_in_app_window != NULL || extension->is_platform_app()); |
| 430 } | 431 } |
| 431 | 432 |
| 432 if (url_string.empty()) | 433 if (url_string.empty()) |
| 433 return false; | 434 return false; |
| 434 | 435 |
| 435 #if defined(OS_WIN) // Fix up Windows shortcuts. | 436 #if defined(OS_WIN) // Fix up Windows shortcuts. |
| 436 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); | 437 ReplaceSubstringsAfterOffset(&url_string, 0, "\\x", "%"); |
| 437 #endif | 438 #endif |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 // New: | 848 // New: |
| 848 prefs->GetString(prefs::kHomePage), | 849 prefs->GetString(prefs::kHomePage), |
| 849 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 850 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
| 850 prefs->GetBoolean(prefs::kShowHomeButton), | 851 prefs->GetBoolean(prefs::kShowHomeButton), |
| 851 // Backup: | 852 // Backup: |
| 852 backup_homepage, | 853 backup_homepage, |
| 853 backup_homepage_is_ntp, | 854 backup_homepage_is_ntp, |
| 854 backup_show_home_button)); | 855 backup_show_home_button)); |
| 855 } | 856 } |
| 856 } | 857 } |
| OLD | NEW |