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

Side by Side Diff: chrome/browser/local_discovery/privet_http.h

Issue 1415653004: Resolve issue from feedback for 1417363004 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Creates a URL fetcher for PrivetV1. 57 // Creates a URL fetcher for PrivetV1.
58 virtual scoped_ptr<PrivetURLFetcher> CreateURLFetcher( 58 virtual scoped_ptr<PrivetURLFetcher> CreateURLFetcher(
59 const GURL& url, 59 const GURL& url,
60 net::URLFetcher::RequestType request_type, 60 net::URLFetcher::RequestType request_type,
61 PrivetURLFetcher::Delegate* delegate) = 0; 61 PrivetURLFetcher::Delegate* delegate) = 0;
62 62
63 virtual void RefreshPrivetToken( 63 virtual void RefreshPrivetToken(
64 const PrivetURLFetcher::TokenCallback& token_callback) = 0; 64 const PrivetURLFetcher::TokenCallback& token_callback) = 0;
65 65
66 // After this call HTTPS will be used. Only requests to the server with 66 // After this call only HTTPS will be used. Only requests to the server with
67 // matching certificate will be allowed. 67 // matching certificate will be allowed.
68 // Privet v3 devices MUST support HTTPS. Before communicating over HTTPS,
69 // Privet v3 pairing generates a shared secret using SPAKE2 over an
70 // unauthenticated channel. This shared secret is used to then authenticate
71 // the fingerprint of a certificate, which is self-signed. The client then
72 // validates that the HTTPS peer is sending a certificate matching that
73 // fingerprint.
74 // For more information on this protocol:
75 // https://developers.google.com/cloud-devices/v1/reference/local-api/pairing_ start
68 virtual void SwitchToHttps( 76 virtual void SwitchToHttps(
69 uint16_t port, 77 uint16_t port,
70 const net::SHA256HashValue& certificate_fingerprint) = 0; 78 const net::SHA256HashValue& certificate_fingerprint) = 0;
71 79
72 virtual bool IsInHttpsMode() const = 0; 80 virtual bool IsInHttpsMode() const = 0;
73 }; 81 };
74 82
75 class PrivetDataReadOperation { 83 class PrivetDataReadOperation {
76 public: 84 public:
77 enum ResponseType { 85 enum ResponseType {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 virtual scoped_ptr<PrivetJSONOperation> CreateCapabilitiesOperation( 221 virtual scoped_ptr<PrivetJSONOperation> CreateCapabilitiesOperation(
214 const PrivetJSONOperation::ResultCallback& callback) = 0; 222 const PrivetJSONOperation::ResultCallback& callback) = 0;
215 223
216 // Creates operation to submit print job to local printer. 224 // Creates operation to submit print job to local printer.
217 virtual scoped_ptr<PrivetLocalPrintOperation> CreateLocalPrintOperation( 225 virtual scoped_ptr<PrivetLocalPrintOperation> CreateLocalPrintOperation(
218 PrivetLocalPrintOperation::Delegate* delegate) = 0; 226 PrivetLocalPrintOperation::Delegate* delegate) = 0;
219 }; 227 };
220 228
221 } // namespace local_discovery 229 } // namespace local_discovery
222 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ 230 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc ('k') | chrome/browser/local_discovery/privet_http_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698