| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/proxy/proxy_resolver_script_data.h" | 5 #include "net/proxy/proxy_resolver_script_data.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 scoped_refptr<ProxyResolverScriptData> ProxyResolverScriptData::FromUTF8( | 13 scoped_refptr<ProxyResolverScriptData> ProxyResolverScriptData::FromUTF8( |
| 14 const std::string& utf8) { | 14 const std::string& utf8) { |
| 15 return new ProxyResolverScriptData(TYPE_SCRIPT_CONTENTS, | 15 return new ProxyResolverScriptData(TYPE_SCRIPT_CONTENTS, |
| 16 GURL(), | 16 GURL(), |
| 17 UTF8ToUTF16(utf8)); | 17 base::UTF8ToUTF16(utf8)); |
| 18 } | 18 } |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 scoped_refptr<ProxyResolverScriptData> ProxyResolverScriptData::FromUTF16( | 21 scoped_refptr<ProxyResolverScriptData> ProxyResolverScriptData::FromUTF16( |
| 22 const base::string16& utf16) { | 22 const base::string16& utf16) { |
| 23 return new ProxyResolverScriptData(TYPE_SCRIPT_CONTENTS, GURL(), utf16); | 23 return new ProxyResolverScriptData(TYPE_SCRIPT_CONTENTS, GURL(), utf16); |
| 24 } | 24 } |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 scoped_refptr<ProxyResolverScriptData> ProxyResolverScriptData::FromURL( | 27 scoped_refptr<ProxyResolverScriptData> ProxyResolverScriptData::FromURL( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const GURL& url, | 67 const GURL& url, |
| 68 const base::string16& utf16) | 68 const base::string16& utf16) |
| 69 : type_(type), | 69 : type_(type), |
| 70 url_(url), | 70 url_(url), |
| 71 utf16_(utf16) { | 71 utf16_(utf16) { |
| 72 } | 72 } |
| 73 | 73 |
| 74 ProxyResolverScriptData::~ProxyResolverScriptData() {} | 74 ProxyResolverScriptData::~ProxyResolverScriptData() {} |
| 75 | 75 |
| 76 } // namespace net | 76 } // namespace net |
| OLD | NEW |