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_http_impl.h" | 5 #include "chrome/browser/local_discovery/privet_http_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "chrome/browser/local_discovery/privet_constants.h" | 11 #include "chrome/browser/local_discovery/privet_constants.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace local_discovery { | 14 namespace local_discovery { |
15 | 15 |
16 namespace { | 16 namespace { |
17 // First format argument (string) is the host, second format argument (int) is | 17 // First format argument (string) is the host, second format argument (int) is |
18 // the port. | 18 // the port. |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 281 |
282 void PrivetHTTPClientImpl::CacheInfo(const base::DictionaryValue* cached_info) { | 282 void PrivetHTTPClientImpl::CacheInfo(const base::DictionaryValue* cached_info) { |
283 cached_info_.reset(cached_info->DeepCopy()); | 283 cached_info_.reset(cached_info->DeepCopy()); |
284 std::string token; | 284 std::string token; |
285 if (cached_info_->GetString(kPrivetInfoKeyToken, &token)) { | 285 if (cached_info_->GetString(kPrivetInfoKeyToken, &token)) { |
286 fetcher_factory_.set_token(token); | 286 fetcher_factory_.set_token(token); |
287 } | 287 } |
288 } | 288 } |
289 | 289 |
290 } // namespace local_discovery | 290 } // namespace local_discovery |
OLD | NEW |