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

Side by Side Diff: net/proxy/proxy_resolver_v8.cc

Issue 2945004: Revert 51877, since SpdyNetworkTransactionTest.CorruptFrameSessionError start... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_resolver_v8.h ('k') | net/proxy/proxy_resolver_v8_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 void ProxyResolverV8::CancelRequest(RequestHandle request) { 634 void ProxyResolverV8::CancelRequest(RequestHandle request) {
635 // This is a synchronous ProxyResolver; no possibility for async requests. 635 // This is a synchronous ProxyResolver; no possibility for async requests.
636 NOTREACHED(); 636 NOTREACHED();
637 } 637 }
638 638
639 void ProxyResolverV8::PurgeMemory() { 639 void ProxyResolverV8::PurgeMemory() {
640 context_->PurgeMemory(); 640 context_->PurgeMemory();
641 } 641 }
642 642
643 void ProxyResolverV8::Shutdown() {
644 js_bindings_->Shutdown();
645 }
646
647 int ProxyResolverV8::SetPacScript(const GURL& /*url*/, 643 int ProxyResolverV8::SetPacScript(const GURL& /*url*/,
648 const string16& pac_script, 644 const string16& pac_script,
649 CompletionCallback* /*callback*/) { 645 CompletionCallback* /*callback*/) {
650 context_.reset(); 646 context_.reset();
651 if (pac_script.empty()) 647 if (pac_script.empty())
652 return ERR_PAC_SCRIPT_FAILED; 648 return ERR_PAC_SCRIPT_FAILED;
653 649
654 // Try parsing the PAC script. 650 // Try parsing the PAC script.
655 scoped_ptr<Context> context(new Context(js_bindings_.get())); 651 scoped_ptr<Context> context(new Context(js_bindings_.get()));
656 int rv = context->InitV8(pac_script); 652 int rv = context->InitV8(pac_script);
657 if (rv == OK) 653 if (rv == OK)
658 context_.reset(context.release()); 654 context_.reset(context.release());
659 return rv; 655 return rv;
660 } 656 }
661 657
662 } // namespace net 658 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_v8.h ('k') | net/proxy/proxy_resolver_v8_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698