OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/api/gcd_private/privet_v3_session.h" | 5 #include "chrome/browser/extensions/api/gcd_private/privet_v3_session.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "chrome/browser/extensions/api/gcd_private/privet_v3_context_getter.h" | 16 #include "chrome/browser/extensions/api/gcd_private/privet_v3_context_getter.h" |
17 #include "crypto/hmac.h" | 17 #include "crypto/hmac.h" |
18 #include "crypto/p224_spake.h" | 18 #include "crypto/p224_spake.h" |
19 #include "net/base/load_flags.h" | 19 #include "net/base/load_flags.h" |
20 #include "net/http/http_response_headers.h" | 20 #include "net/http/http_response_headers.h" |
21 #include "net/url_request/url_fetcher_delegate.h" | 21 #include "net/url_request/url_fetcher_delegate.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
23 | 23 |
24 namespace extensions { | 24 namespace extensions { |
25 | 25 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // Only session with pairing in process needs to be canceled. Paired sessions | 507 // Only session with pairing in process needs to be canceled. Paired sessions |
508 // (in https mode) does not need to be canceled. | 508 // (in https mode) does not need to be canceled. |
509 if (session_id_.empty() || use_https_) | 509 if (session_id_.empty() || use_https_) |
510 return; | 510 return; |
511 base::DictionaryValue input; | 511 base::DictionaryValue input; |
512 input.SetString(kPrivetV3KeySessionId, session_id_); | 512 input.SetString(kPrivetV3KeySessionId, session_id_); |
513 StartPostRequest(kPrivetV3PairingCancelPath, input, MessageCallback()); | 513 StartPostRequest(kPrivetV3PairingCancelPath, input, MessageCallback()); |
514 } | 514 } |
515 | 515 |
516 } // namespace extensions | 516 } // namespace extensions |
OLD | NEW |