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

Side by Side Diff: trunk/src/components/autofill/content/browser/wallet/wallet_client.cc

Issue 23604043: Revert 221713 "rAc: Wallet: UMA for wallet response codes." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/autofill/content/browser/wallet/wallet_client.h" 5 #include "components/autofill/content/browser/wallet/wallet_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 base::Bind(&WalletClient::StartNextPendingRequest, 588 base::Bind(&WalletClient::StartNextPendingRequest,
589 weak_ptr_factory_.GetWeakPtr()));; 589 weak_ptr_factory_.GetWeakPtr()));;
590 590
591 std::string data; 591 std::string data;
592 source->GetResponseAsString(&data); 592 source->GetResponseAsString(&data);
593 VLOG(1) << "Response body: " << data; 593 VLOG(1) << "Response body: " << data;
594 594
595 scoped_ptr<base::DictionaryValue> response_dict; 595 scoped_ptr<base::DictionaryValue> response_dict;
596 596
597 int response_code = source->GetResponseCode(); 597 int response_code = source->GetResponseCode();
598 delegate_->GetMetricLogger().LogWalletResponseCode(response_code);
599
600 switch (response_code) { 598 switch (response_code) {
601 // HTTP_BAD_REQUEST means the arguments are invalid. No point retrying. 599 // HTTP_BAD_REQUEST means the arguments are invalid. No point retrying.
602 case net::HTTP_BAD_REQUEST: { 600 case net::HTTP_BAD_REQUEST: {
603 request_type_ = NO_PENDING_REQUEST; 601 request_type_ = NO_PENDING_REQUEST;
604 HandleWalletError(BAD_REQUEST); 602 HandleWalletError(BAD_REQUEST);
605 return; 603 return;
606 } 604 }
607 // HTTP_OK holds a valid response and HTTP_INTERNAL_SERVER_ERROR holds an 605 // HTTP_OK holds a valid response and HTTP_INTERNAL_SERVER_ERROR holds an
608 // error code and message for the user. 606 // error code and message for the user.
609 case net::HTTP_OK: 607 case net::HTTP_OK:
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 NOTREACHED(); 817 NOTREACHED();
820 return AutofillMetrics::UNKNOWN_API_CALL; 818 return AutofillMetrics::UNKNOWN_API_CALL;
821 } 819 }
822 820
823 NOTREACHED(); 821 NOTREACHED();
824 return AutofillMetrics::UNKNOWN_API_CALL; 822 return AutofillMetrics::UNKNOWN_API_CALL;
825 } 823 }
826 824
827 } // namespace wallet 825 } // namespace wallet
828 } // namespace autofill 826 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | trunk/src/components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698