Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/ui/extensions/application_launch.cc

Issue 10825257: Remove metrics collection from Kiosk Mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/extensions/application_launch.h" 5 #include "chrome/browser/ui/extensions/application_launch.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/extensions/default_apps_trial.h" 10 #include "chrome/browser/extensions/default_apps_trial.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/web_applications/web_app.h" 24 #include "chrome/browser/web_applications/web_app.h"
25 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/extensions/extension.h" 26 #include "chrome/common/extensions/extension.h"
27 #include "chrome/common/extensions/extension_constants.h" 27 #include "chrome/common/extensions/extension_constants.h"
28 #include "chrome/common/url_constants.h" 28 #include "chrome/common/url_constants.h"
29 #include "content/public/browser/render_view_host.h" 29 #include "content/public/browser/render_view_host.h"
30 #include "content/public/browser/web_contents.h" 30 #include "content/public/browser/web_contents.h"
31 #include "content/public/browser/web_contents_view.h" 31 #include "content/public/browser/web_contents_view.h"
32 #include "content/public/common/renderer_preferences.h" 32 #include "content/public/common/renderer_preferences.h"
33 33
34 #if defined(OS_CHROMEOS)
35 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_metrics.h"
36 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
37 #endif
38
39 #if defined(USE_ASH) 34 #if defined(USE_ASH)
40 #include "ash/ash_switches.h" 35 #include "ash/ash_switches.h"
41 #include "chrome/browser/ui/views/ash/panel_view_aura.h" 36 #include "chrome/browser/ui/views/ash/panel_view_aura.h"
42 #endif 37 #endif
43 38
44 using content::WebContents; 39 using content::WebContents;
45 using extensions::Extension; 40 using extensions::Extension;
46 using extensions::ExtensionPrefs; 41 using extensions::ExtensionPrefs;
47 42
48 namespace { 43 namespace {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 Profile* profile = params.profile; 277 Profile* profile = params.profile;
283 const extensions::Extension* extension = params.extension; 278 const extensions::Extension* extension = params.extension;
284 extension_misc::LaunchContainer container = params.container; 279 extension_misc::LaunchContainer container = params.container;
285 const GURL& override_url = params.override_url; 280 const GURL& override_url = params.override_url;
286 281
287 WebContents* tab = NULL; 282 WebContents* tab = NULL;
288 ExtensionPrefs* prefs = profile->GetExtensionService()->extension_prefs(); 283 ExtensionPrefs* prefs = profile->GetExtensionService()->extension_prefs();
289 prefs->SetActiveBit(extension->id(), true); 284 prefs->SetActiveBit(extension->id(), true);
290 285
291 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchContainer", container, 100); 286 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchContainer", container, 100);
292 #if defined(OS_CHROMEOS)
293 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled())
294 chromeos::KioskModeMetrics::Get()->UserOpenedApp();
295 #endif
296 287
297 if (extension->is_platform_app()) { 288 if (extension->is_platform_app()) {
298 extensions::LaunchPlatformApp(profile, extension, params.command_line, 289 extensions::LaunchPlatformApp(profile, extension, params.command_line,
299 params.current_directory); 290 params.current_directory);
300 return NULL; 291 return NULL;
301 } 292 }
302 293
303 switch (container) { 294 switch (container) {
304 case extension_misc::LAUNCH_NONE: { 295 case extension_misc::LAUNCH_NONE: {
305 NOTREACHED(); 296 NOTREACHED();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // OnDidGetApplicationInfo, which calls 333 // OnDidGetApplicationInfo, which calls
343 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as 334 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as
344 // pending web app action. 335 // pending web app action.
345 tab_contents->extension_tab_helper()->set_pending_web_app_action( 336 tab_contents->extension_tab_helper()->set_pending_web_app_action(
346 extensions::TabHelper::UPDATE_SHORTCUT); 337 extensions::TabHelper::UPDATE_SHORTCUT);
347 338
348 return tab; 339 return tab;
349 } 340 }
350 341
351 } // namespace application_launch 342 } // namespace application_launch
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698