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

Side by Side Diff: net/proxy/single_threaded_proxy_resolver.h

Issue 2817043: Reduce the copying of string data between C++ and javascript in proxy_resolver_v8.cc. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix comment typo 'converts' 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_service_unittest.cc ('k') | net/proxy/single_threaded_proxy_resolver.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_SINGLE_THREADED_PROXY_RESOLVER_H_ 5 #ifndef NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_
6 #define NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ 6 #define NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 friend class Job; 51 friend class Job;
52 class SetPacScriptTask; 52 class SetPacScriptTask;
53 friend class SetPacScriptTask; 53 friend class SetPacScriptTask;
54 // FIFO queue that contains the in-progress job, and any pending jobs. 54 // FIFO queue that contains the in-progress job, and any pending jobs.
55 typedef std::deque<scoped_refptr<Job> > PendingJobsQueue; 55 typedef std::deque<scoped_refptr<Job> > PendingJobsQueue;
56 56
57 base::Thread* thread() { return thread_.get(); } 57 base::Thread* thread() { return thread_.get(); }
58 58
59 // ProxyResolver implementation: 59 // ProxyResolver implementation:
60 virtual int SetPacScript(const GURL& pac_url, 60 virtual int SetPacScript(const GURL& pac_url,
61 const std::string& pac_bytes, 61 const string16& pac_script,
62 CompletionCallback* callback); 62 CompletionCallback* callback);
63 63
64 // Starts the worker thread if it isn't already running. 64 // Starts the worker thread if it isn't already running.
65 void EnsureThreadStarted(); 65 void EnsureThreadStarted();
66 66
67 // Starts the next job from |pending_jobs_| if possible. 67 // Starts the next job from |pending_jobs_| if possible.
68 void ProcessPendingJobs(); 68 void ProcessPendingJobs();
69 69
70 // Removes the front entry of the jobs queue. |expected_job| is our 70 // Removes the front entry of the jobs queue. |expected_job| is our
71 // expectation of what the front of the job queue is; it is only used by 71 // expectation of what the front of the job queue is; it is only used by
(...skipping 13 matching lines...) Expand all
85 // executing on |thread_|. 85 // executing on |thread_|.
86 scoped_ptr<base::Thread> thread_; 86 scoped_ptr<base::Thread> thread_;
87 87
88 PendingJobsQueue pending_jobs_; 88 PendingJobsQueue pending_jobs_;
89 scoped_refptr<SetPacScriptTask> outstanding_set_pac_script_task_; 89 scoped_refptr<SetPacScriptTask> outstanding_set_pac_script_task_;
90 }; 90 };
91 91
92 } // namespace net 92 } // namespace net
93 93
94 #endif // NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ 94 #endif // NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_service_unittest.cc ('k') | net/proxy/single_threaded_proxy_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698