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

Side by Side Diff: chromecast/crash/app_state_tracker.h

Issue 1154383006: Adding crash utilities to chromecast/crash. (Closed) Base URL: https://eureka-internal.googlesource.com/chromium/src@master
Patch Set: Refactored crash dependencies Created 5 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMECAST_CRASH_APP_STATE_TRACKER_H_
6 #define CHROMECAST_CRASH_APP_STATE_TRACKER_H_
7
8 #include <string>
9
10 namespace chromecast {
11
12 class AppStateTracker {
13 public:
14 // Record |app_id| as the last app that attempted to launch.
15 static void SetLastLaunchedApp(const std::string& app_id);
16
17 // The current app becomes the previous app, |app_id| becomes the current app.
18 static void SetCurrentApp(const std::string& app_id);
19
20 // Returns the id of the app that was last attempted to launch.
21 static std::string GetLastLaunchedApp();
22
23 // Returns the id of the active app.
24 static std::string GetCurrentApp();
25
26 // Returns the id of the app which was previously active.
27 static std::string GetPreviousApp();
28 };
29
30 } // namespace chromecast
31
32 #endif // CHROMECAST_CRASH_APP_STATE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698