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

Side by Side Diff: net/tools/dump_cache/upgrade.cc

Issue 8956014: base::Bind: Cleanup almost-unused OldCompletionCallbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix. Created 9 years 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/http/mock_http_cache.cc ('k') | net/url_request/view_cache_helper.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/bind.h"
6 #include "base/bind_helpers.h"
5 #include "base/file_path.h" 7 #include "base/file_path.h"
6 #include "base/logging.h" 8 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 10 #include "base/message_loop.h"
9 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 12 #include "base/string_util.h"
11 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
12 #include "base/win/scoped_handle.h" 14 #include "base/win/scoped_handle.h"
13 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
14 #include "net/base/io_buffer.h" 16 #include "net/base/io_buffer.h"
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 DEBUGMSG("\t\t\tSlave GetEntryFromList\n"); 728 DEBUGMSG("\t\t\tSlave GetEntryFromList\n");
727 if (input_->msg.long_arg1 != reinterpret_cast<int64>(entry_)) 729 if (input_->msg.long_arg1 != reinterpret_cast<int64>(entry_))
728 return RESULT_INVALID_PARAMETER; 730 return RESULT_INVALID_PARAMETER;
729 731
730 // We know that the current iteration is valid. 732 // We know that the current iteration is valid.
731 if (entry_) 733 if (entry_)
732 entry_->Close(); 734 entry_->Close();
733 735
734 int rv; 736 int rv;
735 if (input_->msg.command == GET_NEXT_ENTRY) { 737 if (input_->msg.command == GET_NEXT_ENTRY) {
736 rv = cache_->OpenNextEntry(&iterator_, 738 rv = cache_->OpenNextEntry(
737 reinterpret_cast<disk_cache::Entry**>(&entry_), 739 &iterator_, reinterpret_cast<disk_cache::Entry**>(&entry_),
738 &next_callback_); 740 base::Bind(&SlaveSM::DoGetEntryComplete, base::Unretained(this)));
739 } else { 741 } else {
740 DCHECK(input_->msg.command == GET_PREV_ENTRY); 742 DCHECK(input_->msg.command == GET_PREV_ENTRY);
741 rv = cache_->OpenPrevEntry(&iterator_, 743 rv = cache_->OpenPrevEntry(&iterator_,
742 reinterpret_cast<disk_cache::Entry**>(&entry_), 744 reinterpret_cast<disk_cache::Entry**>(&entry_),
743 &next_callback_); 745 &next_callback_);
744 } 746 }
745 DCHECK_EQ(net::ERR_IO_PENDING, rv); 747 DCHECK_EQ(net::ERR_IO_PENDING, rv);
746 return RESULT_PENDING; 748 return RESULT_PENDING;
747 } 749 }
748 750
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 924
923 SlaveSM slave(input_path, pipe); 925 SlaveSM slave(input_path, pipe);
924 if (!slave.DoInit()) { 926 if (!slave.DoInit()) {
925 printf("Unable to talk with the main process\n"); 927 printf("Unable to talk with the main process\n");
926 return -1; 928 return -1;
927 } 929 }
928 930
929 loop.Run(); 931 loop.Run();
930 return 0; 932 return 0;
931 } 933 }
OLDNEW
« no previous file with comments | « net/http/mock_http_cache.cc ('k') | net/url_request/view_cache_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698