OLD | NEW |
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/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 enum ValidationCacheStatus { | 32 enum ValidationCacheStatus { |
33 CACHE_MISS = 0, | 33 CACHE_MISS = 0, |
34 CACHE_HIT, | 34 CACHE_HIT, |
35 CACHE_MAX | 35 CACHE_MAX |
36 }; | 36 }; |
37 | 37 |
38 const FilePath::StringType NaClIrtName() { | 38 const FilePath::StringType NaClIrtName() { |
39 FilePath::StringType irt_name; | 39 FilePath::StringType irt_name; |
40 if (CommandLine::ForCurrentProcess()->HasSwitch( | 40 if (CommandLine::ForCurrentProcess()->HasSwitch( |
41 switches::kEnableNaClSRPCProxy)) | 41 switches::kEnableNaClSRPCProxy)) |
| 42 irt_name.append(FILE_PATH_LITERAL("nacl_irt_srpc_")); |
| 43 else |
42 irt_name.append(FILE_PATH_LITERAL("nacl_irt_")); | 44 irt_name.append(FILE_PATH_LITERAL("nacl_irt_")); |
43 else | |
44 irt_name.append(FILE_PATH_LITERAL("nacl_ipc_irt_")); | |
45 | 45 |
46 #if defined(ARCH_CPU_X86_FAMILY) | 46 #if defined(ARCH_CPU_X86_FAMILY) |
47 #if defined(ARCH_CPU_X86_64) | 47 #if defined(ARCH_CPU_X86_64) |
48 bool is64 = true; | 48 bool is64 = true; |
49 #elif defined(OS_WIN) | 49 #elif defined(OS_WIN) |
50 bool is64 = (base::win::OSInfo::GetInstance()->wow64_status() == | 50 bool is64 = (base::win::OSInfo::GetInstance()->wow64_status() == |
51 base::win::OSInfo::WOW64_ENABLED); | 51 base::win::OSInfo::WOW64_ENABLED); |
52 #else | 52 #else |
53 bool is64 = false; | 53 bool is64 = false; |
54 #endif | 54 #endif |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 // because it can degrade the responsiveness of the browser. | 448 // because it can degrade the responsiveness of the browser. |
449 // The task is sequenced so that multiple writes happen in order. | 449 // The task is sequenced so that multiple writes happen in order. |
450 content::BrowserThread::PostBlockingPoolSequencedTask( | 450 content::BrowserThread::PostBlockingPoolSequencedTask( |
451 kValidationCacheSequenceName, | 451 kValidationCacheSequenceName, |
452 FROM_HERE, | 452 FROM_HERE, |
453 base::Bind(WriteCache, validation_cache_file_path_, | 453 base::Bind(WriteCache, validation_cache_file_path_, |
454 base::Owned(pickle))); | 454 base::Owned(pickle))); |
455 } | 455 } |
456 validation_cache_is_modified_ = false; | 456 validation_cache_is_modified_ = false; |
457 } | 457 } |
OLD | NEW |