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

Side by Side Diff: chrome/browser/nacl_host/nacl_browser.cc

Issue 16154005: Remove dependency from NaCl code on chrome_constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the new method to NaClBrowser 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
« no previous file with comments | « chrome/browser/nacl_host/nacl_browser.h ('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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 base::FilePath plugin_dir; 190 base::FilePath plugin_dir;
191 if (!PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &plugin_dir)) { 191 if (!PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &plugin_dir)) {
192 DLOG(ERROR) << "Failed to locate the plugins directory, NaCl disabled."; 192 DLOG(ERROR) << "Failed to locate the plugins directory, NaCl disabled.";
193 MarkAsFailed(); 193 MarkAsFailed();
194 return; 194 return;
195 } 195 }
196 irt_filepath_ = plugin_dir.Append(NaClIrtName()); 196 irt_filepath_ = plugin_dir.Append(NaClIrtName());
197 } 197 }
198 } 198 }
199 199
200 #if defined(OS_WIN)
201 bool NaClBrowser::GetNaCl64ExePath(base::FilePath* exe_path) {
202 base::FilePath module_path;
203 if (!PathService::Get(base::FILE_MODULE, &module_path)) {
204 LOG(ERROR) << "NaCl process launch failed: could not resolve module";
205 return false;
206 }
207 *exe_path = module_path.DirName().Append(L"nacl64");
208 return true;
209 }
210 #endif
211
200 NaClBrowser* NaClBrowser::GetInstance() { 212 NaClBrowser* NaClBrowser::GetInstance() {
201 return Singleton<NaClBrowser>::get(); 213 return Singleton<NaClBrowser>::get();
202 } 214 }
203 215
204 bool NaClBrowser::IsReady() const { 216 bool NaClBrowser::IsReady() const {
205 return (IsOk() && 217 return (IsOk() &&
206 irt_state_ == NaClResourceReady && 218 irt_state_ == NaClResourceReady &&
207 validation_cache_state_ == NaClResourceReady); 219 validation_cache_state_ == NaClResourceReady);
208 } 220 }
209 221
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // because it can degrade the responsiveness of the browser. 559 // because it can degrade the responsiveness of the browser.
548 // The task is sequenced so that multiple writes happen in order. 560 // The task is sequenced so that multiple writes happen in order.
549 content::BrowserThread::PostBlockingPoolSequencedTask( 561 content::BrowserThread::PostBlockingPoolSequencedTask(
550 kValidationCacheSequenceName, 562 kValidationCacheSequenceName,
551 FROM_HERE, 563 FROM_HERE,
552 base::Bind(WriteCache, validation_cache_file_path_, 564 base::Bind(WriteCache, validation_cache_file_path_,
553 base::Owned(pickle))); 565 base::Owned(pickle)));
554 } 566 }
555 validation_cache_is_modified_ = false; 567 validation_cache_is_modified_ = false;
556 } 568 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_browser.h ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698