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

Side by Side Diff: chrome/browser/dom_ui/chrome_url_data_manager.cc

Issue 2108001: Make sure we don't "hang" when the bookmarks extension API does not work. Als... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
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 "chrome/browser/dom_ui/chrome_url_data_manager.h" 5 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 data_ = bytes; 372 data_ = bytes;
373 int bytes_read; 373 int bytes_read;
374 if (pending_buf_.get()) { 374 if (pending_buf_.get()) {
375 CHECK(pending_buf_->data()); 375 CHECK(pending_buf_->data());
376 CompleteRead(pending_buf_, pending_buf_size_, &bytes_read); 376 CompleteRead(pending_buf_, pending_buf_size_, &bytes_read);
377 pending_buf_ = NULL; 377 pending_buf_ = NULL;
378 NotifyReadComplete(bytes_read); 378 NotifyReadComplete(bytes_read);
379 } 379 }
380 } else { 380 } else {
381 // The request failed. 381 // The request failed.
382 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, 0)); 382 NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, net::ERR_FAILED));
383 } 383 }
384 } 384 }
385 385
386 bool URLRequestChromeJob::ReadRawData(net::IOBuffer* buf, int buf_size, 386 bool URLRequestChromeJob::ReadRawData(net::IOBuffer* buf, int buf_size,
387 int* bytes_read) { 387 int* bytes_read) {
388 if (!data_.get()) { 388 if (!data_.get()) {
389 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); 389 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
390 DCHECK(!pending_buf_.get()); 390 DCHECK(!pending_buf_.get());
391 CHECK(buf->data()); 391 CHECK(buf->data());
392 pending_buf_ = buf; 392 pending_buf_ = buf;
(...skipping 29 matching lines...) Expand all
422 net::ERR_INVALID_URL)); 422 net::ERR_INVALID_URL));
423 } 423 }
424 } 424 }
425 425
426 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request, 426 URLRequestChromeFileJob::URLRequestChromeFileJob(URLRequest* request,
427 const FilePath& path) 427 const FilePath& path)
428 : URLRequestFileJob(request, path) { 428 : URLRequestFileJob(request, path) {
429 } 429 }
430 430
431 URLRequestChromeFileJob::~URLRequestChromeFileJob() { } 431 URLRequestChromeFileJob::~URLRequestChromeFileJob() { }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/bookmarks_ui.cc ('k') | chrome/browser/resources/bookmark_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698