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

Side by Side Diff: content/browser/gpu/shader_disk_cache.cc

Issue 686963002: Switching profiler instrumentations from ScopedProfile to ScopedTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/gpu/shader_disk_cache.h" 5 #include "content/browser/gpu/shader_disk_cache.h"
6 6
7 #include "base/profiler/scoped_profile.h" 7 #include "base/profiler/scoped_tracker.h"
8 #include "base/threading/thread_checker.h" 8 #include "base/threading/thread_checker.h"
9 #include "content/browser/gpu/gpu_process_host.h" 9 #include "content/browser/gpu/gpu_process_host.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "gpu/command_buffer/common/constants.h" 11 #include "gpu/command_buffer/common/constants.h"
12 #include "net/base/cache_type.h" 12 #include "net/base/cache_type.h"
13 #include "net/base/io_buffer.h" 13 #include "net/base/io_buffer.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 15
16 namespace content { 16 namespace content {
17 17
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 void ShaderDiskReadHelper::LoadCache() { 255 void ShaderDiskReadHelper::LoadCache() {
256 DCHECK(CalledOnValidThread()); 256 DCHECK(CalledOnValidThread());
257 if (!cache_.get()) 257 if (!cache_.get())
258 return; 258 return;
259 OnOpComplete(net::OK); 259 OnOpComplete(net::OK);
260 } 260 }
261 261
262 void ShaderDiskReadHelper::OnOpComplete(int rv) { 262 void ShaderDiskReadHelper::OnOpComplete(int rv) {
263 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422516 is fixed. 263 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
264 tracked_objects::ScopedProfile tracking_profile( 264 tracked_objects::ScopedTracker tracking_profile(
265 FROM_HERE_WITH_EXPLICIT_FUNCTION( 265 FROM_HERE_WITH_EXPLICIT_FUNCTION(
266 "422516 ShaderDiskReadHelper::OnOpComplete")); 266 "422516 ShaderDiskReadHelper::OnOpComplete"));
267 267
268 DCHECK(CalledOnValidThread()); 268 DCHECK(CalledOnValidThread());
269 if (!cache_.get()) 269 if (!cache_.get())
270 return; 270 return;
271 271
272 do { 272 do {
273 switch (op_type_) { 273 switch (op_type_) {
274 case OPEN_NEXT: 274 case OPEN_NEXT:
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 const net::CompletionCallback& callback) { 622 const net::CompletionCallback& callback) {
623 if (entry_map_.empty()) { 623 if (entry_map_.empty()) {
624 return net::OK; 624 return net::OK;
625 } 625 }
626 cache_complete_callback_ = callback; 626 cache_complete_callback_ = callback;
627 return net::ERR_IO_PENDING; 627 return net::ERR_IO_PENDING;
628 } 628 }
629 629
630 } // namespace content 630 } // namespace content
631 631
OLDNEW
« no previous file with comments | « content/browser/appcache/view_appcache_internals_job.cc ('k') | content/browser/histogram_internals_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698