| 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_v8.h" | 5 #include "net/proxy/proxy_resolver_v8.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstdio> | 8 #include <cstdio> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/debug/leak_annotations.h" | 13 #include "base/debug/leak_annotations.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/strings/string_tokenizer.h" | 16 #include "base/strings/string_tokenizer.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
| 20 #include "gin/array_buffer.h" | 20 #include "gin/array_buffer.h" |
| 21 #include "gin/public/isolate_holder.h" | 21 #include "gin/public/isolate_holder.h" |
| 22 #include "gin/v8_initializer.h" | 22 #include "gin/v8_initializer.h" |
| 23 #include "net/base/ip_address_number.h" |
| 23 #include "net/base/net_errors.h" | 24 #include "net/base/net_errors.h" |
| 24 #include "net/base/net_util.h" | |
| 25 #include "net/proxy/proxy_info.h" | 25 #include "net/proxy/proxy_info.h" |
| 26 #include "net/proxy/proxy_resolver_script.h" | 26 #include "net/proxy/proxy_resolver_script.h" |
| 27 #include "net/proxy/proxy_resolver_script_data.h" | 27 #include "net/proxy/proxy_resolver_script_data.h" |
| 28 #include "url/gurl.h" | 28 #include "url/gurl.h" |
| 29 #include "url/url_canon.h" | 29 #include "url/url_canon.h" |
| 30 #include "v8/include/v8.h" | 30 #include "v8/include/v8.h" |
| 31 | 31 |
| 32 // Notes on the javascript environment: | 32 // Notes on the javascript environment: |
| 33 // | 33 // |
| 34 // For the majority of the PAC utility functions, we use the same code | 34 // For the majority of the PAC utility functions, we use the same code |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 return 0; | 867 return 0; |
| 868 | 868 |
| 869 v8::Locker locked(isolate); | 869 v8::Locker locked(isolate); |
| 870 v8::Isolate::Scope isolate_scope(isolate); | 870 v8::Isolate::Scope isolate_scope(isolate); |
| 871 v8::HeapStatistics heap_statistics; | 871 v8::HeapStatistics heap_statistics; |
| 872 isolate->GetHeapStatistics(&heap_statistics); | 872 isolate->GetHeapStatistics(&heap_statistics); |
| 873 return heap_statistics.used_heap_size(); | 873 return heap_statistics.used_heap_size(); |
| 874 } | 874 } |
| 875 | 875 |
| 876 } // namespace net | 876 } // namespace net |
| OLD | NEW |