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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 // Don't launch platform apps in incognito mode. | 193 // Don't launch platform apps in incognito mode. |
194 if (profile->IsOffTheRecord() && extension->is_platform_app()) | 194 if (profile->IsOffTheRecord() && extension->is_platform_app()) |
195 return false; | 195 return false; |
196 | 196 |
197 // Look at preferences to find the right launch container. If no | 197 // Look at preferences to find the right launch container. If no |
198 // preference is set, launch as a window. | 198 // preference is set, launch as a window. |
199 extensions::LaunchContainer launch_container = extensions::GetLaunchContainer( | 199 extensions::LaunchContainer launch_container = extensions::GetLaunchContainer( |
200 extensions::ExtensionPrefs::Get(profile), extension); | 200 extensions::ExtensionPrefs::Get(profile), extension); |
201 | 201 |
202 if (!extensions::util::IsStreamlinedHostedAppsEnabled() && | 202 if (!extensions::util::IsNewBookmarkAppsEnabled() && |
203 !extensions::HasPreferredLaunchContainer( | 203 !extensions::HasPreferredLaunchContainer( |
204 extensions::ExtensionPrefs::Get(profile), extension)) { | 204 extensions::ExtensionPrefs::Get(profile), extension)) { |
205 launch_container = extensions::LAUNCH_CONTAINER_WINDOW; | 205 launch_container = extensions::LAUNCH_CONTAINER_WINDOW; |
206 } | 206 } |
207 | 207 |
208 *out_extension = extension; | 208 *out_extension = extension; |
209 *out_launch_container = launch_container; | 209 *out_launch_container = launch_container; |
210 return true; | 210 return true; |
211 } | 211 } |
212 | 212 |
213 void RecordCmdLineAppHistogram(extensions::Manifest::Type app_type) { | 213 void RecordCmdLineAppHistogram(extensions::Manifest::Type app_type) { |
214 extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_CMD_LINE_APP, | 214 extensions::RecordAppLaunchType(extension_misc::APP_LAUNCH_CMD_LINE_APP, |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 // behavior is desired because completing or skipping the sync promo | 905 // behavior is desired because completing or skipping the sync promo |
906 // causes a redirect to the NTP. | 906 // causes a redirect to the NTP. |
907 if (!startup_urls->empty() && | 907 if (!startup_urls->empty() && |
908 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) | 908 startup_urls->at(0) == GURL(chrome::kChromeUINewTabURL)) |
909 startup_urls->at(0) = sync_promo_url; | 909 startup_urls->at(0) = sync_promo_url; |
910 else | 910 else |
911 startup_urls->insert(startup_urls->begin(), sync_promo_url); | 911 startup_urls->insert(startup_urls->begin(), sync_promo_url); |
912 } | 912 } |
913 } | 913 } |
914 } | 914 } |
OLD | NEW |