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

Unified Diff: chrome/browser/extensions/api/socket/socket.h

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing another cross-platform build issue (try 2) Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/socket/socket.h
diff --git a/chrome/browser/extensions/api/socket/socket.h b/chrome/browser/extensions/api/socket/socket.h
index 2e73cb0d1fee27a496af8b9d77ca2f0a4391b8e5..422d0cd8842e9022e26bbd9e434ae233e5e3c9d0 100644
--- a/chrome/browser/extensions/api/socket/socket.h
+++ b/chrome/browser/extensions/api/socket/socket.h
@@ -45,6 +45,12 @@ class Socket : public ApiResource {
};
virtual ~Socket();
+ void SetOriginalHostname(const std::string& original_hostname) {
+ original_hostname_ = original_hostname;
+ }
+ const std::string& OriginalHostname() {
+ return original_hostname_;
+ }
virtual void Connect(const std::string& address,
int port,
const CompletionCallback& callback) = 0;
@@ -102,7 +108,8 @@ class Socket : public ApiResource {
const net::CompletionCallback& callback) = 0;
virtual void OnWriteComplete(int result);
- const std::string address_;
+ // The name given to Connect(), used when verifying a TLS certificate.
+ std::string original_hostname_;
Ryan Sleevi 2013/11/25 17:30:13 nit: naming wise, original_hostname_ seems a bit c
Lally Singh 2013/12/05 17:07:12 Fair enough. Changed.
bool is_connected_;
private:

Powered by Google App Engine
This is Rietveld 408576698