| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 NET_PROXY_PROXY_RESOLVER_SCRIPT_DATA_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_SCRIPT_DATA_H_ |
| 6 #define NET_PROXY_PROXY_RESOLVER_SCRIPT_DATA_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_SCRIPT_DATA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 // Returns the contents of the script as UTF16. | 49 // Returns the contents of the script as UTF16. |
| 50 // (only valid for type() == TYPE_SCRIPT_CONTENTS). | 50 // (only valid for type() == TYPE_SCRIPT_CONTENTS). |
| 51 const string16& utf16() const; | 51 const string16& utf16() const; |
| 52 | 52 |
| 53 // Returns the URL of the script. | 53 // Returns the URL of the script. |
| 54 // (only valid for type() == TYPE_SCRIPT_URL). | 54 // (only valid for type() == TYPE_SCRIPT_URL). |
| 55 const GURL& url() const; | 55 const GURL& url() const; |
| 56 | 56 |
| 57 // Returns true if |this| matches |other|. |
| 58 bool Equals(const ProxyResolverScriptData* other) const; |
| 59 |
| 57 private: | 60 private: |
| 58 friend class base::RefCountedThreadSafe<ProxyResolverScriptData>; | 61 friend class base::RefCountedThreadSafe<ProxyResolverScriptData>; |
| 59 ProxyResolverScriptData(Type type, | 62 ProxyResolverScriptData(Type type, |
| 60 const GURL& url, | 63 const GURL& url, |
| 61 const string16& utf16); | 64 const string16& utf16); |
| 62 virtual ~ProxyResolverScriptData(); | 65 virtual ~ProxyResolverScriptData(); |
| 63 | 66 |
| 64 | 67 |
| 65 const Type type_; | 68 const Type type_; |
| 66 const GURL url_; | 69 const GURL url_; |
| 67 const string16 utf16_; | 70 const string16 utf16_; |
| 68 }; | 71 }; |
| 69 | 72 |
| 70 } // namespace net | 73 } // namespace net |
| 71 | 74 |
| 72 #endif // NET_PROXY_PROXY_RESOLVER_SCRIPT_DATA_H_ | 75 #endif // NET_PROXY_PROXY_RESOLVER_SCRIPT_DATA_H_ |
| OLD | NEW |