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

Unified Diff: components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java

Issue 600983002: [Checkstyle] Fix misc style issues in Java files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 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: components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
diff --git a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
index f6596eedf6bc7b259df96269ab0c8240ea1a2b56..e13ae1f940954907adddc9595c8aa0c61aaa3028 100644
--- a/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
+++ b/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java
@@ -162,8 +162,8 @@ public class GCMDriver {
}
static void onMessageReceived(Context context, final String appId, final Bundle extras) {
- final String PUSH_API_DATA_KEY = "data";
- if (!extras.containsKey(PUSH_API_DATA_KEY)) {
+ final String pushApiDataKey = "data";
+ if (!extras.containsKey(pushApiDataKey)) {
// For now on Android only the Push API uses GCMDriver. To avoid double-handling of
// messages already handled in Java by other implementations of MultiplexingGcmListener,
// and unnecessarily waking up the browser processes for all existing GCM messages that
@@ -181,18 +181,18 @@ public class GCMDriver {
ThreadUtils.assertOnUiThread();
launchNativeThen(context, new Runnable() {
@Override public void run() {
- final String BUNDLE_SENDER_ID = "from";
- final String BUNDLE_COLLAPSE_KEY = "collapse_key";
- final String BUNDLE_GCMMPLEX = "com.google.ipc.invalidation.gcmmplex.";
+ final String bundleSenderId = "from";
+ final String bundleCollapseKey = "collapse_key";
+ final String bundleGcmplex = "com.google.ipc.invalidation.gcmmplex.";
- String senderId = extras.getString(BUNDLE_SENDER_ID);
- String collapseKey = extras.getString(BUNDLE_COLLAPSE_KEY);
+ String senderId = extras.getString(bundleSenderId);
+ String collapseKey = extras.getString(bundleCollapseKey);
List<String> dataKeysAndValues = new ArrayList<String>();
for (String key : extras.keySet()) {
// TODO(johnme): Check there aren't other keys that we need to exclude.
- if (key == BUNDLE_SENDER_ID || key == BUNDLE_COLLAPSE_KEY ||
- key.startsWith(BUNDLE_GCMMPLEX))
+ if (key == bundleSenderId || key == bundleCollapseKey ||
+ key.startsWith(bundleGcmplex))
continue;
dataKeysAndValues.add(key);
dataKeysAndValues.add(extras.getString(key));

Powered by Google App Engine
This is Rietveld 408576698