OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "components/nacl/browser/pnacl_host.h" | 5 #include "components/nacl/browser/pnacl_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 weak_factory_(this) {} | 77 weak_factory_(this) {} |
78 | 78 |
79 PnaclHost::~PnaclHost() { | 79 PnaclHost::~PnaclHost() { |
80 // When PnaclHost is destroyed, it's too late to post anything to the cache | 80 // When PnaclHost is destroyed, it's too late to post anything to the cache |
81 // thread (it will hang shutdown). So just leak the cache backend. | 81 // thread (it will hang shutdown). So just leak the cache backend. |
82 pnacl::PnaclTranslationCache* cache = disk_cache_.release(); | 82 pnacl::PnaclTranslationCache* cache = disk_cache_.release(); |
83 (void)cache; | 83 (void)cache; |
84 } | 84 } |
85 | 85 |
86 PnaclHost* PnaclHost::GetInstance() { | 86 PnaclHost* PnaclHost::GetInstance() { |
87 return Singleton<PnaclHost>::get(); | 87 return base::Singleton<PnaclHost>::get(); |
88 } | 88 } |
89 | 89 |
90 PnaclHost::PendingTranslation::PendingTranslation() | 90 PnaclHost::PendingTranslation::PendingTranslation() |
91 : process_handle(base::kNullProcessHandle), | 91 : process_handle(base::kNullProcessHandle), |
92 render_view_id(0), | 92 render_view_id(0), |
93 nexe_fd(NULL), | 93 nexe_fd(NULL), |
94 got_nexe_fd(false), | 94 got_nexe_fd(false), |
95 got_cache_reply(false), | 95 got_cache_reply(false), |
96 got_cache_hit(false), | 96 got_cache_hit(false), |
97 is_incognito(false), | 97 is_incognito(false), |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 DCHECK(pending_backend_operations_ >= 0); | 686 DCHECK(pending_backend_operations_ >= 0); |
687 if (pending_translations_.empty() && | 687 if (pending_translations_.empty() && |
688 pending_backend_operations_ <= 0 && | 688 pending_backend_operations_ <= 0 && |
689 cache_state_ == CacheReady) { | 689 cache_state_ == CacheReady) { |
690 cache_state_ = CacheUninitialized; | 690 cache_state_ = CacheUninitialized; |
691 disk_cache_.reset(); | 691 disk_cache_.reset(); |
692 } | 692 } |
693 } | 693 } |
694 | 694 |
695 } // namespace pnacl | 695 } // namespace pnacl |
OLD | NEW |