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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 // Check the prefs for overridden mode. | 737 // Check the prefs for overridden mode. |
738 ExtensionService* extension_service = profile->GetExtensionService(); | 738 ExtensionService* extension_service = profile->GetExtensionService(); |
739 DCHECK(extension_service); | 739 DCHECK(extension_service); |
740 | 740 |
741 ExtensionPrefs::LaunchType launch_type = | 741 ExtensionPrefs::LaunchType launch_type = |
742 extension_service->extension_prefs()->GetLaunchType( | 742 extension_service->extension_prefs()->GetLaunchType( |
743 extension->id(), ExtensionPrefs::LAUNCH_DEFAULT); | 743 extension->id(), ExtensionPrefs::LAUNCH_DEFAULT); |
744 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100); | 744 UMA_HISTOGRAM_ENUMERATION("Extensions.AppTabLaunchType", launch_type, 100); |
745 | 745 |
746 static bool default_apps_trial_exists = | 746 static bool default_apps_trial_exists = |
747 base::FieldTrialList::TrialExists(kDefaultAppsTrial_Name); | 747 base::FieldTrialList::TrialExists(kDefaultAppsTrialName); |
748 if (default_apps_trial_exists) { | 748 if (default_apps_trial_exists) { |
749 UMA_HISTOGRAM_ENUMERATION( | 749 UMA_HISTOGRAM_ENUMERATION( |
750 base::FieldTrial::MakeName("Extensions.AppTabLaunchType", | 750 base::FieldTrial::MakeName("Extensions.AppTabLaunchType", |
751 kDefaultAppsTrial_Name), | 751 kDefaultAppsTrialName), |
752 launch_type, 100); | 752 launch_type, 100); |
753 } | 753 } |
754 | 754 |
755 int add_type = TabStripModel::ADD_ACTIVE; | 755 int add_type = TabStripModel::ADD_ACTIVE; |
756 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) | 756 if (launch_type == ExtensionPrefs::LAUNCH_PINNED) |
757 add_type |= TabStripModel::ADD_PINNED; | 757 add_type |= TabStripModel::ADD_PINNED; |
758 | 758 |
759 GURL extension_url = UrlForExtension(extension, override_url); | 759 GURL extension_url = UrlForExtension(extension, override_url); |
760 // TODO(erikkay): START_PAGE doesn't seem like the right transition in all | 760 // TODO(erikkay): START_PAGE doesn't seem like the right transition in all |
761 // cases. | 761 // cases. |
(...skipping 4561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5323 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5323 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5324 } else { | 5324 } else { |
5325 GlobalErrorService* service = | 5325 GlobalErrorService* service = |
5326 GlobalErrorServiceFactory::GetForProfile(profile()); | 5326 GlobalErrorServiceFactory::GetForProfile(profile()); |
5327 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5327 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5328 if (error) { | 5328 if (error) { |
5329 error->ShowBubbleView(this); | 5329 error->ShowBubbleView(this); |
5330 } | 5330 } |
5331 } | 5331 } |
5332 } | 5332 } |
OLD | NEW |