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

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

Issue 23461033: rAc: Wallet: UMA for wallet response codes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | 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
598 switch (response_code) { 600 switch (response_code) {
599 // HTTP_BAD_REQUEST means the arguments are invalid. No point retrying. 601 // HTTP_BAD_REQUEST means the arguments are invalid. No point retrying.
600 case net::HTTP_BAD_REQUEST: { 602 case net::HTTP_BAD_REQUEST: {
601 request_type_ = NO_PENDING_REQUEST; 603 request_type_ = NO_PENDING_REQUEST;
602 HandleWalletError(BAD_REQUEST); 604 HandleWalletError(BAD_REQUEST);
603 return; 605 return;
604 } 606 }
605 // HTTP_OK holds a valid response and HTTP_INTERNAL_SERVER_ERROR holds an 607 // HTTP_OK holds a valid response and HTTP_INTERNAL_SERVER_ERROR holds an
606 // error code and message for the user. 608 // error code and message for the user.
607 case net::HTTP_OK: 609 case net::HTTP_OK:
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 NOTREACHED(); 819 NOTREACHED();
818 return AutofillMetrics::UNKNOWN_API_CALL; 820 return AutofillMetrics::UNKNOWN_API_CALL;
819 } 821 }
820 822
821 NOTREACHED(); 823 NOTREACHED();
822 return AutofillMetrics::UNKNOWN_API_CALL; 824 return AutofillMetrics::UNKNOWN_API_CALL;
823 } 825 }
824 826
825 } // namespace wallet 827 } // namespace wallet
826 } // namespace autofill 828 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698