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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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) 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/threading/thread_checker.h" 7 #include "base/threading/thread_checker.h"
8 #include "content/browser/gpu/gpu_process_host.h" 8 #include "content/browser/gpu/gpu_process_host.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "net/base/cache_type.h" 10 #include "net/base/cache_type.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 return; 522 return;
523 } 523 }
524 is_initialized_ = true; 524 is_initialized_ = true;
525 525
526 int rv = disk_cache::CreateCacheBackend( 526 int rv = disk_cache::CreateCacheBackend(
527 net::SHADER_CACHE, 527 net::SHADER_CACHE,
528 net::CACHE_BACKEND_BLOCKFILE, 528 net::CACHE_BACKEND_BLOCKFILE,
529 cache_path_.Append(kGpuCachePath), 529 cache_path_.Append(kGpuCachePath),
530 max_cache_size_, 530 max_cache_size_,
531 true, 531 true,
532 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE), 532 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get(),
533 NULL, 533 NULL,
534 &backend_, 534 &backend_,
535 base::Bind(&ShaderDiskCache::CacheCreatedCallback, this)); 535 base::Bind(&ShaderDiskCache::CacheCreatedCallback, this));
536 536
537 if (rv == net::OK) 537 if (rv == net::OK)
538 cache_available_ = true; 538 cache_available_ = true;
539 } 539 }
540 540
541 void ShaderDiskCache::Cache(const std::string& key, const std::string& shader) { 541 void ShaderDiskCache::Cache(const std::string& key, const std::string& shader) {
542 if (!cache_available_) 542 if (!cache_available_)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 const net::CompletionCallback& callback) { 609 const net::CompletionCallback& callback) {
610 if (entry_map_.empty()) { 610 if (entry_map_.empty()) {
611 return net::OK; 611 return net::OK;
612 } 612 }
613 cache_complete_callback_ = callback; 613 cache_complete_callback_ = callback;
614 return net::ERR_IO_PENDING; 614 return net::ERR_IO_PENDING;
615 } 615 }
616 616
617 } // namespace content 617 } // namespace content
618 618
OLDNEW
« no previous file with comments | « content/browser/geolocation/fake_access_token_store.cc ('k') | content/browser/in_process_webkit/indexed_db_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698