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

Side by Side Diff: net/dns/serial_worker.h

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/ftp/ftp_network_transaction.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) 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 #ifndef NET_DNS_SERIAL_WORKER_H_ 5 #ifndef NET_DNS_SERIAL_WORKER_H_
6 #define NET_DNS_SERIAL_WORKER_H_ 6 #define NET_DNS_SERIAL_WORKER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // protected to allow sub-classing, but prevent deleting 55 // protected to allow sub-classing, but prevent deleting
56 virtual ~SerialWorker(); 56 virtual ~SerialWorker();
57 57
58 // Executed on WorkerPool, at most once at a time. 58 // Executed on WorkerPool, at most once at a time.
59 virtual void DoWork() = 0; 59 virtual void DoWork() = 0;
60 60
61 // Executed on origin thread after |DoRead| completes. 61 // Executed on origin thread after |DoRead| completes.
62 virtual void OnWorkFinished() = 0; 62 virtual void OnWorkFinished() = 0;
63 63
64 base::MessageLoopProxy* loop() { 64 base::MessageLoopProxy* loop() {
65 return message_loop_; 65 return message_loop_.get();
66 } 66 }
67 67
68 private: 68 private:
69 enum State { 69 enum State {
70 CANCELLED = -1, 70 CANCELLED = -1,
71 IDLE = 0, 71 IDLE = 0,
72 WORKING, // |DoWorkJob| posted on WorkerPool, until |OnWorkJobFinished| 72 WORKING, // |DoWorkJob| posted on WorkerPool, until |OnWorkJobFinished|
73 PENDING, // |WorkNow| while WORKING, must re-do work 73 PENDING, // |WorkNow| while WORKING, must re-do work
74 WAITING, // WorkerPool is busy, |RetryWork| is posted 74 WAITING, // WorkerPool is busy, |RetryWork| is posted
75 }; 75 };
(...skipping 13 matching lines...) Expand all
89 89
90 State state_; 90 State state_;
91 91
92 DISALLOW_COPY_AND_ASSIGN(SerialWorker); 92 DISALLOW_COPY_AND_ASSIGN(SerialWorker);
93 }; 93 };
94 94
95 } // namespace net 95 } // namespace net
96 96
97 #endif // NET_DNS_SERIAL_WORKER_H_ 97 #endif // NET_DNS_SERIAL_WORKER_H_
98 98
OLDNEW
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698