| 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/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string_tokenizer.h" |
| 13 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 14 #include "base/strings/string_tokenizer.h" | |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "googleurl/src/gurl.h" | |
| 18 #include "googleurl/src/url_canon.h" | |
| 19 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 20 #include "net/base/net_log.h" | 18 #include "net/base/net_log.h" |
| 21 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
| 22 #include "net/proxy/proxy_info.h" | 20 #include "net/proxy/proxy_info.h" |
| 23 #include "net/proxy/proxy_resolver_script.h" | 21 #include "net/proxy/proxy_resolver_script.h" |
| 22 #include "url/gurl.h" |
| 23 #include "url/url_canon.h" |
| 24 #include "v8/include/v8.h" | 24 #include "v8/include/v8.h" |
| 25 | 25 |
| 26 // Notes on the javascript environment: | 26 // Notes on the javascript environment: |
| 27 // | 27 // |
| 28 // For the majority of the PAC utility functions, we use the same code | 28 // For the majority of the PAC utility functions, we use the same code |
| 29 // as Firefox. See the javascript library that proxy_resolver_scipt.h | 29 // as Firefox. See the javascript library that proxy_resolver_scipt.h |
| 30 // pulls in. | 30 // pulls in. |
| 31 // | 31 // |
| 32 // In addition, we implement a subset of Microsoft's extensions to PAC. | 32 // In addition, we implement a subset of Microsoft's extensions to PAC. |
| 33 // - myIpAddressEx() | 33 // - myIpAddressEx() |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 if (!g_default_isolate_) | 785 if (!g_default_isolate_) |
| 786 return 0; | 786 return 0; |
| 787 | 787 |
| 788 v8::Locker locked(g_default_isolate_); | 788 v8::Locker locked(g_default_isolate_); |
| 789 v8::HeapStatistics heap_statistics; | 789 v8::HeapStatistics heap_statistics; |
| 790 g_default_isolate_->GetHeapStatistics(&heap_statistics); | 790 g_default_isolate_->GetHeapStatistics(&heap_statistics); |
| 791 return heap_statistics.used_heap_size(); | 791 return heap_statistics.used_heap_size(); |
| 792 } | 792 } |
| 793 | 793 |
| 794 } // namespace net | 794 } // namespace net |
| OLD | NEW |