summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks
diff options
context:
space:
mode:
authorkkimlabs <kkimlabs@chromium.org>2015-02-04 17:32:47 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-05 01:33:37 +0000
commitf0a2c44b48f239ea4e6c4d0571be846a5fc524fa (patch)
tree46530bd3c89897ceb3fdb3421817d5b5e93b1427 /components/enhanced_bookmarks
parent97823ee2d8054183f2b011313a06c28f1945ca23 (diff)
downloadchromium_src-f0a2c44b48f239ea4e6c4d0571be846a5fc524fa.zip
chromium_src-f0a2c44b48f239ea4e6c4d0571be846a5fc524fa.tar.gz
chromium_src-f0a2c44b48f239ea4e6c4d0571be846a5fc524fa.tar.bz2
[Android] Upstreamed Stars UMA from iOS.
There are some UMA strings, enum constants in iOS repository that can be shared with Android, so moved to components. BUG=452254 Review URL: https://codereview.chromium.org/891493003 Cr-Commit-Position: refs/heads/master@{#314707}
Diffstat (limited to 'components/enhanced_bookmarks')
-rw-r--r--components/enhanced_bookmarks/BUILD.gn17
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_utils.h17
2 files changed, 34 insertions, 0 deletions
diff --git a/components/enhanced_bookmarks/BUILD.gn b/components/enhanced_bookmarks/BUILD.gn
index 7ce7ed5..11462c4 100644
--- a/components/enhanced_bookmarks/BUILD.gn
+++ b/components/enhanced_bookmarks/BUILD.gn
@@ -2,6 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+if (is_android) {
+ import("//build/config/android/config.gni")
+ import("//build/config/android/rules.gni")
+}
+
# GYP: //components/enhanced_bookmarks.gypi:enhanced_bookmarks
source_set("enhanced_bookmarks") {
sources = [
@@ -49,6 +54,18 @@ source_set("enhanced_bookmarks") {
}
}
+if (is_android) {
+ # GYP: //components/enhanced_bookmarks.gypi:enhanced_bookmarks_launch_location_srcjar
+ java_cpp_enum("enhanced_bookmarks_launch_location_srcjar") {
+ sources = [
+ "enhanced_bookmark_utils.h",
+ ]
+ outputs = [
+ "org/chromium/chrome/browser/enhancedbookmark/LaunchLocation.java",
+ ]
+ }
+}
+
# GYP: //components/enhanced_bookmarks.gypi:enhanced_bookmarks_test_support
source_set("test_support") {
testonly = true
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_utils.h b/components/enhanced_bookmarks/enhanced_bookmark_utils.h
index 40b4a0b..f2ce4dc 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_utils.h
+++ b/components/enhanced_bookmarks/enhanced_bookmark_utils.h
@@ -16,6 +16,23 @@ class BookmarkNode;
namespace enhanced_bookmarks {
+static const char kLaunchLocationUMA[] = "Stars.LaunchLocation";
+
+// Possible locations where a bookmark can be opened from.
+// Please sync with the corresponding histograms.xml.
+//
+// A Java counterpart will be generated for this enum.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.enhancedbookmark
+enum LaunchLocation {
+ ALL_ITEMS = 0,
+ UNCATEGORIZED = 1, // Deprecated.
+ FOLDER = 2,
+ FILTER = 3,
+ SEARCH = 4,
+ BOOKMARK_EDITOR = 5,
+ COUNT = 6,
+};
+
// The vector is sorted in place.
// All of the bookmarks in |nodes| must be urls.
void SortBookmarksByName(std::vector<const bookmarks::BookmarkNode*>& nodes);