| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 return contents; | 723 return contents; |
| 724 | 724 |
| 725 // Check the prefs for overridden mode. | 725 // Check the prefs for overridden mode. |
| 726 ExtensionService* extension_service = profile->GetExtensionService(); | 726 ExtensionService* extension_service = profile->GetExtensionService(); |
| 727 DCHECK(extension_service); | 727 DCHECK(extension_service); |
| 728 | 728 |
| 729 ExtensionPrefs::LaunchType launch_type = | 729 ExtensionPrefs::LaunchType launch_type = |
| 730 extension_service->extension_prefs()->GetLaunchType( | 730 extension_service->extension_prefs()->GetLaunchType( |
| 731 extension->id(), ExtensionPrefs::LAUNCH_DEFAULT); | 731 extension->id(), ExtensionPrefs::LAUNCH_DEFAULT); |
| 732 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100); | 732 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100); |
| 733 |
| 734 // Track launches of the webstore specifically. |
| 735 if (extension->id() == extension_misc::kWebStoreAppId) |
| 736 UserMetrics::RecordAction(UserMetricsAction("Extensions.WebStoreLaunch")); |
| 737 |
| 733 int add_type = TabStripModel::ADD_ACTIVE; | 738 int add_type = TabStripModel::ADD_ACTIVE; |
| 734 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) | 739 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) |
| 735 add_type |= TabStripModel::ADD_PINNED; | 740 add_type |= TabStripModel::ADD_PINNED; |
| 736 | 741 |
| 737 // For extensions lacking launch urls, determine a reasonable fallback. | 742 // For extensions lacking launch urls, determine a reasonable fallback. |
| 738 GURL extension_url = extension->GetFullLaunchURL(); | 743 GURL extension_url = extension->GetFullLaunchURL(); |
| 739 if (!extension_url.is_valid()) { | 744 if (!extension_url.is_valid()) { |
| 740 extension_url = extension->options_url(); | 745 extension_url = extension->options_url(); |
| 741 if (!extension_url.is_valid()) | 746 if (!extension_url.is_valid()) |
| 742 extension_url = GURL(chrome::kChromeUIExtensionsURL); | 747 extension_url = GURL(chrome::kChromeUIExtensionsURL); |
| (...skipping 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5255 profile()->GetOriginalProfile()->GetProfileSyncService(); | 5260 profile()->GetOriginalProfile()->GetProfileSyncService(); |
| 5256 if (service->HasSyncSetupCompleted()) | 5261 if (service->HasSyncSetupCompleted()) |
| 5257 ShowOptionsTab(chrome::kSyncSetupSubPage); | 5262 ShowOptionsTab(chrome::kSyncSetupSubPage); |
| 5258 else | 5263 else |
| 5259 service->ShowLoginDialog(); | 5264 service->ShowLoginDialog(); |
| 5260 } | 5265 } |
| 5261 | 5266 |
| 5262 void Browser::ToggleSpeechInput() { | 5267 void Browser::ToggleSpeechInput() { |
| 5263 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput(); | 5268 GetSelectedTabContentsWrapper()->render_view_host()->ToggleSpeechInput(); |
| 5264 } | 5269 } |
| OLD | NEW |