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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.h

Issue 900553006: Updated KioskAppManager to track whether an app was auto-launched. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/app_mode/kiosk_app_manager.h
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h
index 0084d54d11138eed116d3c67e725823b5a3fa87b..195c7382fe7e172f674be75957b38636cffb6c26 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.h
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.h
@@ -59,7 +59,8 @@ class KioskAppManager : public KioskAppDataDelegate,
// Struct to hold app info returned from GetApps() call.
struct App {
- App(const KioskAppData& data, bool is_extension_pending);
+ App(const KioskAppData& data, bool is_extension_pending,
bartfab (slow) 2015/02/06 14:14:07 Nit: The style guide says: "For function declarat
Andrew T Wilson (Slow) 2015/02/06 20:43:50 Done.
+ bool was_auto_launched_with_zero_delay);
App();
~App();
@@ -68,6 +69,7 @@ class KioskAppManager : public KioskAppDataDelegate,
std::string name;
gfx::ImageSkia icon;
bool is_loading;
+ bool was_auto_launched_with_zero_delay;
};
typedef std::vector<App> Apps;
@@ -123,6 +125,9 @@ class KioskAppManager : public KioskAppDataDelegate,
// Returns true if owner/policy enabled auto launch.
bool IsAutoLaunchEnabled() const;
+ // Returns true if current app was auto launched.
bartfab (slow) 2015/02/06 14:14:07 Nit: ... with zero delay.
Andrew T Wilson (Slow) 2015/02/06 20:43:50 Done.
+ bool IsCurrentAppAutoLaunched() const;
bartfab (slow) 2015/02/06 14:14:07 Nit: WithZeroDelay.
Andrew T Wilson (Slow) 2015/02/06 20:43:50 Done.
+
// Enable auto launch setter.
void SetEnableAutoLaunch(bool value);
@@ -195,6 +200,12 @@ class KioskAppManager : public KioskAppDataDelegate,
bool external_loader_created() const { return external_loader_created_; }
+ // Notifies the KioskAppManager that a given app was auto-launched
+ // automatically with no delay on startup. Certain privacy-sensitive
+ // kiosk-mode behavior (such as network reporting) is only enabled for
+ // kiosk apps that are immediately auto-launched on startup.
+ void SetAppWasAutoLaunchedWithZeroDelay(const std::string& app_id);
+
private:
friend struct base::DefaultLazyInstanceTraits<KioskAppManager>;
friend struct base::DefaultDeleter<KioskAppManager>;
@@ -261,6 +272,7 @@ class KioskAppManager : public KioskAppDataDelegate,
bool ownership_established_;
ScopedVector<KioskAppData> apps_;
std::string auto_launch_app_id_;
+ std::string currently_auto_launched_app_;
bartfab (slow) 2015/02/06 14:14:07 Nit: For consistency, _with_zero_delay.
Andrew T Wilson (Slow) 2015/02/06 20:43:50 Done, but this is an incredibly unwieldy 44 charac
ObserverList<KioskAppManagerObserver, true> observers_;
scoped_ptr<CrosSettings::ObserverSubscription>

Powered by Google App Engine
This is Rietveld 408576698