Lines Matching refs:request_id
50 const int request_id = it->first;
52 RejectRequest(request_id, base::File::FILE_ERROR_ABORT);
63 int request_id = next_id_++;
66 if (requests_.find(request_id) != requests_.end())
75 request_id));
76 requests_[request_id] = request;
78 FOR_EACH_OBSERVER(Observer, observers_, OnRequestCreated(request_id, type));
84 if (!request->handler->Execute(request_id)) {
85 DestroyRequest(request_id);
89 FOR_EACH_OBSERVER(Observer, observers_, OnRequestExecuted(request_id));
91 return request_id;
94 bool RequestManager::FulfillRequest(int request_id,
97 RequestMap::iterator request_it = requests_.find(request_id);
101 request_it->second->handler->OnSuccess(request_id, response.Pass(), has_more);
104 Observer, observers_, OnRequestFulfilled(request_id, has_more));
107 DestroyRequest(request_id);
114 bool RequestManager::RejectRequest(int request_id, base::File::Error error) {
115 RequestMap::iterator request_it = requests_.find(request_id);
119 request_it->second->handler->OnError(request_id, error);
121 FOR_EACH_OBSERVER(Observer, observers_, OnRequestRejected(request_id, error));
123 DestroyRequest(request_id);
150 void RequestManager::OnRequestTimeout(int request_id) {
151 FOR_EACH_OBSERVER(Observer, observers_, OnRequestTimeouted(request_id));
153 RejectRequest(request_id, base::File::FILE_ERROR_ABORT);
156 void RequestManager::DestroyRequest(int request_id) {
157 RequestMap::iterator request_it = requests_.find(request_id);
164 FOR_EACH_OBSERVER(Observer, observers_, OnRequestDestroyed(request_id));