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/printing/cloud_print/privet_url_fetcher.h" | 5 #include "chrome/browser/printing/cloud_print/privet_url_fetcher.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <limits> | 10 #include <limits> |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/debug/dump_without_crashing.h" | 14 #include "base/debug/dump_without_crashing.h" |
15 #include "base/json/json_reader.h" | 15 #include "base/json/json_reader.h" |
16 #include "base/location.h" | 16 #include "base/location.h" |
17 #include "base/memory/singleton.h" | 17 #include "base/memory/singleton.h" |
18 #include "base/rand_util.h" | 18 #include "base/rand_util.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
21 #include "base/thread_task_runner_handle.h" | 21 #include "base/threading/thread_task_runner_handle.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/printing/cloud_print/privet_constants.h" | 23 #include "chrome/browser/printing/cloud_print/privet_constants.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "net/base/load_flags.h" | 25 #include "net/base/load_flags.h" |
26 #include "net/http/http_status_code.h" | 26 #include "net/http/http_status_code.h" |
27 #include "net/url_request/url_request_context.h" | 27 #include "net/url_request/url_request_context.h" |
28 #include "net/url_request/url_request_status.h" | 28 #include "net/url_request/url_request_status.h" |
29 | 29 |
30 namespace cloud_print { | 30 namespace cloud_print { |
31 | 31 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 } | 381 } |
382 | 382 |
383 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) { | 383 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) { |
384 return (error == kPrivetErrorDeviceBusy) || | 384 return (error == kPrivetErrorDeviceBusy) || |
385 (error == kPrivetV3ErrorDeviceBusy) || | 385 (error == kPrivetV3ErrorDeviceBusy) || |
386 (error == kPrivetErrorPendingUserAction) || | 386 (error == kPrivetErrorPendingUserAction) || |
387 (error == kPrivetErrorPrinterBusy); | 387 (error == kPrivetErrorPrinterBusy); |
388 } | 388 } |
389 | 389 |
390 } // namespace cloud_print | 390 } // namespace cloud_print |
OLD | NEW |