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

Side by Side Diff: chrome/browser/nacl_host/nacl_browser.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
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/browser/nacl_host/nacl_process_host.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 "chrome/browser/nacl_host/nacl_browser.h" 5 #include "chrome/browser/nacl_host/nacl_browser.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EnsureValidationCacheAvailable(); 222 EnsureValidationCacheAvailable();
223 } 223 }
224 224
225 // Load the IRT async. 225 // Load the IRT async.
226 void NaClBrowser::EnsureIrtAvailable() { 226 void NaClBrowser::EnsureIrtAvailable() {
227 if (IsOk() && irt_state_ == NaClResourceUninitialized) { 227 if (IsOk() && irt_state_ == NaClResourceUninitialized) {
228 irt_state_ = NaClResourceRequested; 228 irt_state_ = NaClResourceRequested;
229 // TODO(ncbray) use blocking pool. 229 // TODO(ncbray) use blocking pool.
230 if (!base::FileUtilProxy::CreateOrOpen( 230 if (!base::FileUtilProxy::CreateOrOpen(
231 content::BrowserThread::GetMessageLoopProxyForThread( 231 content::BrowserThread::GetMessageLoopProxyForThread(
232 content::BrowserThread::FILE), 232 content::BrowserThread::FILE)
233 .get(),
233 irt_filepath_, 234 irt_filepath_,
234 base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, 235 base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ,
235 base::Bind(&NaClBrowser::OnIrtOpened, 236 base::Bind(&NaClBrowser::OnIrtOpened,
236 weak_factory_.GetWeakPtr()))) { 237 weak_factory_.GetWeakPtr()))) {
237 LOG(ERROR) << "Internal error, NaCl disabled."; 238 LOG(ERROR) << "Internal error, NaCl disabled.";
238 MarkAsFailed(); 239 MarkAsFailed();
239 } 240 }
240 } 241 }
241 } 242 }
242 243
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // because it can degrade the responsiveness of the browser. 547 // because it can degrade the responsiveness of the browser.
547 // The task is sequenced so that multiple writes happen in order. 548 // The task is sequenced so that multiple writes happen in order.
548 content::BrowserThread::PostBlockingPoolSequencedTask( 549 content::BrowserThread::PostBlockingPoolSequencedTask(
549 kValidationCacheSequenceName, 550 kValidationCacheSequenceName,
550 FROM_HERE, 551 FROM_HERE,
551 base::Bind(WriteCache, validation_cache_file_path_, 552 base::Bind(WriteCache, validation_cache_file_path_,
552 base::Owned(pickle))); 553 base::Owned(pickle)));
553 } 554 }
554 validation_cache_is_modified_ = false; 555 validation_cache_is_modified_ = false;
555 } 556 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698