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

Unified Diff: chrome/common/net/gaia/google_service_auth_error.h

Issue 3186020: Use a generic error instead of a dcheck. (Closed)
Patch Set: fix include name Created 10 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/google_service_auth_error.h
diff --git a/chrome/common/net/gaia/google_service_auth_error.h b/chrome/common/net/gaia/google_service_auth_error.h
index 7cc275132c33f881ea221deb3af5ba3a467a77f7..5764187f8bf306eafad933ec90808e6a187d450a 100644
--- a/chrome/common/net/gaia/google_service_auth_error.h
+++ b/chrome/common/net/gaia/google_service_auth_error.h
@@ -26,6 +26,7 @@
#include <string>
#include "base/logging.h"
#include "googleurl/src/gurl.h"
+#include "net/base/net_errors.h"
class GoogleServiceAuthError {
public:
@@ -83,7 +84,10 @@ class GoogleServiceAuthError {
: state_(s),
captcha_("", GURL(), GURL()),
network_error_(0) {
- DCHECK(s != CONNECTION_FAILED);
+ // If the caller has no idea, then we just set it to a generic failure.
+ if (s == CONNECTION_FAILED) {
+ network_error_ = net::ERR_FAILED;
+ }
}
// Construct a GoogleServiceAuthError from a network error.
« 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