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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java

Issue 1739163005: Java side of purging BookmarkId from offline pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
new file mode 100644
index 0000000000000000000000000000000000000000..c8dc4a41c30aac662c12d7b277e307b98c8fd843
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/ClientId.java
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.offlinepages;
+
+/**
+ * Object to hold a client identifier for an offline page.
+ */
+public class ClientId {
+ private String mNamespace;
+ private String mId;
+
+ public ClientId(String namespace, String id) {
+ mNamespace = namespace;
+ mId = id;
+ }
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public boolean equals(Object o) {
+ if (o instanceof ClientId) {
+ ClientId id = (ClientId) o;
fgorski 2016/02/29 18:42:28 otherId
bburns 2016/02/29 21:41:22 Done.
+ return id.getNamespace().equals(namespace) && id.getId().equals(id);
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return (namespace + ":" + id).hashCode();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698