OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/app_runtime/app_runtime_api.h" | 5 #include "extensions/browser/api/app_runtime/app_runtime_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 ->SetLastLaunchTime(extension_id, base::Time::Now()); | 47 ->SetLastLaunchTime(extension_id, base::Time::Now()); |
48 } | 48 } |
49 | 49 |
50 void DispatchOnLaunchedEventImpl( | 50 void DispatchOnLaunchedEventImpl( |
51 const std::string& extension_id, | 51 const std::string& extension_id, |
52 app_runtime::LaunchSource source, | 52 app_runtime::LaunchSource source, |
53 std::unique_ptr<base::DictionaryValue> launch_data, | 53 std::unique_ptr<base::DictionaryValue> launch_data, |
54 BrowserContext* context) { | 54 BrowserContext* context) { |
55 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchSource", source, | 55 UMA_HISTOGRAM_ENUMERATION("Extensions.AppLaunchSource", source, |
56 app_runtime::LaunchSource::LAUNCH_SOURCE_LAST + 1); | 56 app_runtime::LaunchSource::LAUNCH_SOURCE_LAST + 1); |
57 | |
Mr4D (OOO till 08-26)
2016/12/03 01:55:27
Since nothing has changed in this file - could you
Andra Paraschiv
2016/12/06 13:19:16
Done.
| |
58 // "Forced app mode" is true for Chrome OS kiosk mode. | 57 // "Forced app mode" is true for Chrome OS kiosk mode. |
59 launch_data->SetBoolean( | 58 launch_data->SetBoolean( |
60 "isKioskSession", | 59 "isKioskSession", |
61 ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()); | 60 ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()); |
62 | 61 |
63 launch_data->SetBoolean( | 62 launch_data->SetBoolean( |
64 "isPublicSession", | 63 "isPublicSession", |
65 ExtensionsBrowserClient::Get()->IsLoggedInAsPublicAccount()); | 64 ExtensionsBrowserClient::Get()->IsLoggedInAsPublicAccount()); |
66 | 65 |
67 std::unique_ptr<base::ListValue> args(new base::ListValue()); | 66 std::unique_ptr<base::ListValue> args(new base::ListValue()); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 launch_data.url.reset(new std::string(url.spec())); | 212 launch_data.url.reset(new std::string(url.spec())); |
214 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); | 213 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); |
215 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { | 214 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { |
216 launch_data.source = source_enum; | 215 launch_data.source = source_enum; |
217 } | 216 } |
218 DispatchOnLaunchedEventImpl(extension->id(), source_enum, | 217 DispatchOnLaunchedEventImpl(extension->id(), source_enum, |
219 launch_data.ToValue(), context); | 218 launch_data.ToValue(), context); |
220 } | 219 } |
221 | 220 |
222 } // namespace extensions | 221 } // namespace extensions |
OLD | NEW |