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

Side by Side Diff: chrome/browser/printing/cloud_print/privet_url_fetcher.cc

Issue 1553333002: Move cloud print specific files out of local_discovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveprn
Patch Set: Created 4 years, 11 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
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 "chrome/browser/local_discovery/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 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/debug/dump_without_crashing.h" 13 #include "base/debug/dump_without_crashing.h"
14 #include "base/json/json_reader.h" 14 #include "base/json/json_reader.h"
15 #include "base/location.h" 15 #include "base/location.h"
16 #include "base/memory/singleton.h" 16 #include "base/memory/singleton.h"
17 #include "base/rand_util.h" 17 #include "base/rand_util.h"
18 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
19 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
20 #include "base/thread_task_runner_handle.h" 20 #include "base/thread_task_runner_handle.h"
21 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
22 #include "chrome/browser/local_discovery/privet_constants.h" 22 #include "chrome/browser/printing/cloud_print/privet_constants.h"
23 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
24 #include "net/base/load_flags.h" 24 #include "net/base/load_flags.h"
25 #include "net/http/http_status_code.h" 25 #include "net/http/http_status_code.h"
26 #include "net/url_request/url_request_context.h" 26 #include "net/url_request/url_request_context.h"
27 #include "net/url_request/url_request_status.h" 27 #include "net/url_request/url_request_status.h"
28 28
29 namespace local_discovery { 29 namespace cloud_print {
30 30
31 namespace { 31 namespace {
32 32
33 typedef std::map<std::string, std::string> TokenMap; 33 typedef std::map<std::string, std::string> TokenMap;
34 34
35 struct TokenMapHolder { 35 struct TokenMapHolder {
36 public: 36 public:
37 static TokenMapHolder* GetInstance() { 37 static TokenMapHolder* GetInstance() {
38 return base::Singleton<TokenMapHolder>::get(); 38 return base::Singleton<TokenMapHolder>::get();
39 } 39 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 379 }
380 } 380 }
381 381
382 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) { 382 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) {
383 return (error == kPrivetErrorDeviceBusy) || 383 return (error == kPrivetErrorDeviceBusy) ||
384 (error == kPrivetV3ErrorDeviceBusy) || 384 (error == kPrivetV3ErrorDeviceBusy) ||
385 (error == kPrivetErrorPendingUserAction) || 385 (error == kPrivetErrorPendingUserAction) ||
386 (error == kPrivetErrorPrinterBusy); 386 (error == kPrivetErrorPrinterBusy);
387 } 387 }
388 388
389 } // namespace local_discovery 389 } // namespace cloud_print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698