| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 // TODO(skerner): Could pass in |extension| and |launch_container|, | 420 // TODO(skerner): Could pass in |extension| and |launch_container|, |
| 421 // and avoid calling GetAppLaunchContainer() both here and in | 421 // and avoid calling GetAppLaunchContainer() both here and in |
| 422 // OpenApplicationTab(). | 422 // OpenApplicationTab(). |
| 423 | 423 |
| 424 if (launch_container == extension_misc::LAUNCH_TAB) | 424 if (launch_container == extension_misc::LAUNCH_TAB) |
| 425 return false; | 425 return false; |
| 426 | 426 |
| 427 RecordCmdLineAppHistogram(); | 427 RecordCmdLineAppHistogram(); |
| 428 | 428 |
| 429 application_launch::LaunchParams params(profile, extension, |
| 430 launch_container, NEW_WINDOW); |
| 431 params.command_line = &command_line_; |
| 429 WebContents* tab_in_app_window = application_launch::OpenApplication( | 432 WebContents* tab_in_app_window = application_launch::OpenApplication( |
| 430 profile, extension, launch_container, GURL(), NEW_WINDOW, | 433 params); |
| 431 &command_line_); | |
| 432 | 434 |
| 433 if (out_app_contents) | 435 if (out_app_contents) |
| 434 *out_app_contents = tab_in_app_window; | 436 *out_app_contents = tab_in_app_window; |
| 435 | 437 |
| 436 // Platform apps fire off a launch event which may or may not open a window. | 438 // Platform apps fire off a launch event which may or may not open a window. |
| 437 return (tab_in_app_window != NULL || extension->is_platform_app()); | 439 return (tab_in_app_window != NULL || extension->is_platform_app()); |
| 438 } | 440 } |
| 439 | 441 |
| 440 if (url_string.empty()) | 442 if (url_string.empty()) |
| 441 return false; | 443 return false; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 // New: | 862 // New: |
| 861 prefs->GetString(prefs::kHomePage), | 863 prefs->GetString(prefs::kHomePage), |
| 862 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 864 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
| 863 prefs->GetBoolean(prefs::kShowHomeButton), | 865 prefs->GetBoolean(prefs::kShowHomeButton), |
| 864 // Backup: | 866 // Backup: |
| 865 backup_homepage, | 867 backup_homepage, |
| 866 backup_homepage_is_ntp, | 868 backup_homepage_is_ntp, |
| 867 backup_show_home_button)); | 869 backup_show_home_button)); |
| 868 } | 870 } |
| 869 } | 871 } |
| OLD | NEW |