| OLD | NEW |
| 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 "chrome/browser/local_discovery/privet_url_fetcher.h" | 5 #include "chrome/browser/local_discovery/privet_url_fetcher.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 if (token.empty()) { | 338 if (token.empty()) { |
| 339 delegate_->OnError(this, TOKEN_ERROR); | 339 delegate_->OnError(this, TOKEN_ERROR); |
| 340 } else { | 340 } else { |
| 341 SetTokenForHost(GetHostString(), token); | 341 SetTokenForHost(GetHostString(), token); |
| 342 Try(); | 342 Try(); |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 | 345 |
| 346 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) { | 346 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) { |
| 347 return (error == kPrivetErrorDeviceBusy) || | 347 return (error == kPrivetErrorDeviceBusy) || |
| 348 (error == kPrivetV3ErrorDeviceBusy) || |
| 348 (error == kPrivetErrorPendingUserAction) || | 349 (error == kPrivetErrorPendingUserAction) || |
| 349 (error == kPrivetErrorPrinterBusy); | 350 (error == kPrivetErrorPrinterBusy); |
| 350 } | 351 } |
| 351 | 352 |
| 352 } // namespace local_discovery | 353 } // namespace local_discovery |
| OLD | NEW |