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

Unified Diff: chrome/browser/chromeos/note_taking_app_utils.cc

Issue 2331093002: UMA stats for stylus usage (Closed)
Patch Set: Created 4 years, 3 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/note_taking_app_utils.cc
diff --git a/chrome/browser/chromeos/note_taking_app_utils.cc b/chrome/browser/chromeos/note_taking_app_utils.cc
index 7f12a8da4081447fc6d397c1fde54acc820fe55b..044124dbdf075670d1d75b4782f08fc9d28ff420 100644
--- a/chrome/browser/chromeos/note_taking_app_utils.cc
+++ b/chrome/browser/chromeos/note_taking_app_utils.cc
@@ -15,6 +15,7 @@
#include "base/strings/string_split.h"
#include "chrome/browser/profiles/profile.h"
#include "chromeos/chromeos_switches.h"
+#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/api/app_runtime.h"
#include "extensions/common/extension.h"
@@ -86,4 +87,12 @@ void LaunchNoteTakingAppForNewNote(Profile* profile,
apps::LaunchPlatformAppWithAction(profile, app, std::move(action_data), path);
}
+bool IsCurrentAppNoteTakingApp(extensions::AppWindow* app_window) {
+ for (const char* id : kExtensionIds) {
xiyuan 2016/09/12 20:15:47 Line 46-54 above seems suggesting that the app ids
xiaoyinh(OOO Sep 11-29) 2016/09/16 18:41:15 Oh, I missed this case. Thanks for pointing that o
+ if (id == app_window->extension_id())
+ return true;
+ }
+ return false;
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698