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

Side by Side Diff: chrome/browser/local_discovery/privet_url_fetcher.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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
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/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 12 matching lines...) Expand all
23 23
24 namespace local_discovery { 24 namespace local_discovery {
25 25
26 namespace { 26 namespace {
27 27
28 typedef std::map<std::string, std::string> TokenMap; 28 typedef std::map<std::string, std::string> TokenMap;
29 29
30 struct TokenMapHolder { 30 struct TokenMapHolder {
31 public: 31 public:
32 static TokenMapHolder* GetInstance() { 32 static TokenMapHolder* GetInstance() {
33 return Singleton<TokenMapHolder>::get(); 33 return base::Singleton<TokenMapHolder>::get();
34 } 34 }
35 35
36 TokenMap map; 36 TokenMap map;
37 }; 37 };
38 38
39 const char kXPrivetTokenHeaderPrefix[] = "X-Privet-Token: "; 39 const char kXPrivetTokenHeaderPrefix[] = "X-Privet-Token: ";
40 const char kPrivetV3AuthTokenHeaderPrefix[] = "Authorization: "; 40 const char kPrivetV3AuthTokenHeaderPrefix[] = "Authorization: ";
41 const char kRangeHeaderFormat[] = "Range: bytes=%d-%d"; 41 const char kRangeHeaderFormat[] = "Range: bytes=%d-%d";
42 const char kXPrivetEmptyToken[] = "\"\""; 42 const char kXPrivetEmptyToken[] = "\"\"";
43 const char kPrivetAuthTokenUnknown[] = "Unknown"; 43 const char kPrivetAuthTokenUnknown[] = "Unknown";
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 373
374 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) { 374 bool PrivetURLFetcher::PrivetErrorTransient(const std::string& error) {
375 return (error == kPrivetErrorDeviceBusy) || 375 return (error == kPrivetErrorDeviceBusy) ||
376 (error == kPrivetV3ErrorDeviceBusy) || 376 (error == kPrivetV3ErrorDeviceBusy) ||
377 (error == kPrivetErrorPendingUserAction) || 377 (error == kPrivetErrorPendingUserAction) ||
378 (error == kPrivetErrorPrinterBusy); 378 (error == kPrivetErrorPrinterBusy);
379 } 379 }
380 380
381 } // namespace local_discovery 381 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_notifications_factory.cc ('k') | chrome/browser/mac/mac_startup_profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698