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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « net/third_party/nss/ssl/BUILD.gn ('k') | net/tools/quic/end_to_end_test.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 #include "net/tools/dump_cache/simple_cache_dumper.h" 5 #include "net/tools/dump_cache/simple_cache_dumper.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/profiler/scoped_tracker.h"
13 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
14 #include "net/base/cache_type.h" 15 #include "net/base/cache_type.h"
15 #include "net/base/io_buffer.h" 16 #include "net/base/io_buffer.h"
16 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
17 #include "net/disk_cache/disk_cache.h" 18 #include "net/disk_cache/disk_cache.h"
18 #include "net/tools/dump_cache/cache_dumper.h" 19 #include "net/tools/dump_cache/cache_dumper.h"
19 20
20 namespace net { 21 namespace net {
21 22
22 SimpleCacheDumper::SimpleCacheDumper(base::FilePath input_path, 23 SimpleCacheDumper::SimpleCacheDumper(base::FilePath input_path,
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 src_entry_->Close(); 254 src_entry_->Close();
254 writer_->CloseEntry(dst_entry_, base::Time::Now(), base::Time::Now()); 255 writer_->CloseEntry(dst_entry_, base::Time::Now(), base::Time::Now());
255 src_entry_ = NULL; 256 src_entry_ = NULL;
256 dst_entry_ = NULL; 257 dst_entry_ = NULL;
257 258
258 state_ = STATE_OPEN_ENTRY; 259 state_ = STATE_OPEN_ENTRY;
259 return OK; 260 return OK;
260 } 261 }
261 262
262 void SimpleCacheDumper::OnIOComplete(int rv) { 263 void SimpleCacheDumper::OnIOComplete(int rv) {
264 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
265 tracked_objects::ScopedTracker tracking_profile(
266 FROM_HERE_WITH_EXPLICIT_FUNCTION(
267 "422516 SimpleCacheDumper::OnIOComplete"));
268
263 rv = DoLoop(rv); 269 rv = DoLoop(rv);
264 270
265 if (rv != ERR_IO_PENDING) { 271 if (rv != ERR_IO_PENDING) {
266 rv_ = rv; 272 rv_ = rv;
267 cache_.reset(); 273 cache_.reset();
268 base::MessageLoop::current()->Quit(); 274 base::MessageLoop::current()->Quit();
269 } 275 }
270 } 276 }
271 277
272 } // namespace net 278 } // namespace net
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/BUILD.gn ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698