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

Unified Diff: components/autofill/content/browser/wallet/wallet_client.h

Issue 123733002: WalletClient: don't bother queuing requests; we don't make multiple requests concurrently anyway (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 6 years, 11 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/autofill/content/browser/wallet/wallet_client.h
diff --git a/components/autofill/content/browser/wallet/wallet_client.h b/components/autofill/content/browser/wallet/wallet_client.h
index bfd4feb47da00e71ba38d73fd0f3743193feeb1f..bde1ffabdb5e7e52426eec2d35ba28e9ae828c19 100644
--- a/components/autofill/content/browser/wallet/wallet_client.h
+++ b/components/autofill/content/browser/wallet/wallet_client.h
@@ -178,8 +178,8 @@ class WalletClient : public net::URLFetcherDelegate {
bool HasRequestInProgress() const;
- // Cancels and clears the current |request_| and |pending_requests_| (if any).
- void CancelRequests();
+ // Cancels and clears the current |request_|.
+ void CancelRequest();
// Sets the user index and cancels any pending requests.
void SetUserIndex(size_t user_index);
@@ -190,7 +190,7 @@ class WalletClient : public net::URLFetcherDelegate {
FRIEND_TEST_ALL_PREFIXES(WalletClientTest, CancelRequests);
enum RequestType {
- NO_PENDING_REQUEST,
+ NO_REQUEST,
ACCEPT_LEGAL_DOCUMENTS,
AUTHENTICATE_INSTRUMENT,
GET_FULL_WALLET,
@@ -216,9 +216,6 @@ class WalletClient : public net::URLFetcherDelegate {
void HandleNetworkError(int response_code);
void HandleWalletError(ErrorType error_type);
- // Start the next pending request (if any).
- void StartNextPendingRequest();
-
// net::URLFetcherDelegate:
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
@@ -248,16 +245,13 @@ class WalletClient : public net::URLFetcherDelegate {
// The current request object.
scoped_ptr<net::URLFetcher> request_;
- // The type of the current request. Must be NO_PENDING_REQUEST for a request
+ // The type of the current request. Must be NO_REQUEST for a request
// to be initiated as only one request may be running at a given time.
RequestType request_type_;
// The one time pad used for GetFullWallet encryption.
std::vector<uint8> one_time_pad_;
- // Requests that are waiting to be run.
- std::queue<base::Closure> pending_requests_;
-
// When the current request started. Used to track client side latency.
base::Time request_started_timestamp_;

Powered by Google App Engine
This is Rietveld 408576698