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

Side by Side Diff: third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/RouterImpl.java

Issue 1130103005: Ignore lint warning related to UseSparseArrays Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.mojo.bindings; 5 package org.chromium.mojo.bindings;
6 6
7 import android.annotation.SuppressLint;
8
7 import org.chromium.mojo.system.AsyncWaiter; 9 import org.chromium.mojo.system.AsyncWaiter;
8 import org.chromium.mojo.system.MessagePipeHandle; 10 import org.chromium.mojo.system.MessagePipeHandle;
9 11
10 import java.util.HashMap; 12 import java.util.HashMap;
11 import java.util.Map; 13 import java.util.Map;
12 14
13 /** 15 /**
14 * Implementation of {@link Router}. 16 * Implementation of {@link Router}.
15 */ 17 */
16 public class RouterImpl implements Router { 18 public class RouterImpl implements Router {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 private MessageReceiverWithResponder mIncomingMessageReceiver; 52 private MessageReceiverWithResponder mIncomingMessageReceiver;
51 53
52 /** 54 /**
53 * The next id to use for a request id which needs a response. It is auto-in cremented. 55 * The next id to use for a request id which needs a response. It is auto-in cremented.
54 */ 56 */
55 private long mNextRequestId = 1; 57 private long mNextRequestId = 1;
56 58
57 /** 59 /**
58 * The map from request ids to {@link MessageReceiver} of request currently in flight. 60 * The map from request ids to {@link MessageReceiver} of request currently in flight.
59 */ 61 */
62 @SuppressLint("UseSparseArrays")
60 private Map<Long, MessageReceiver> mResponders = new HashMap<Long, MessageRe ceiver>(); 63 private Map<Long, MessageReceiver> mResponders = new HashMap<Long, MessageRe ceiver>();
61 64
62 /** 65 /**
63 * Constructor that will use the default {@link AsyncWaiter}. 66 * Constructor that will use the default {@link AsyncWaiter}.
64 * 67 *
65 * @param messagePipeHandle The {@link MessagePipeHandle} to route message f or. 68 * @param messagePipeHandle The {@link MessagePipeHandle} to route message f or.
66 */ 69 */
67 public RouterImpl(MessagePipeHandle messagePipeHandle) { 70 public RouterImpl(MessagePipeHandle messagePipeHandle) {
68 this(messagePipeHandle, BindingsHelper.getDefaultAsyncWaiterForHandle(me ssagePipeHandle)); 71 this(messagePipeHandle, BindingsHelper.getDefaultAsyncWaiterForHandle(me ssagePipeHandle));
69 } 72 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 189 }
187 return false; 190 return false;
188 } 191 }
189 192
190 private void handleConnectorClose() { 193 private void handleConnectorClose() {
191 if (mIncomingMessageReceiver != null) { 194 if (mIncomingMessageReceiver != null) {
192 mIncomingMessageReceiver.close(); 195 mIncomingMessageReceiver.close();
193 } 196 }
194 } 197 }
195 } 198 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698