OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/nexe_load_manager.h" | 5 #include "components/nacl/renderer/nexe_load_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_tokenizer.h" | 10 #include "base/strings/string_tokenizer.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 } | 346 } |
347 } | 347 } |
348 ReportLoadError(PP_NACL_ERROR_MANIFEST_RESOLVE_URL, | 348 ReportLoadError(PP_NACL_ERROR_MANIFEST_RESOLVE_URL, |
349 std::string("could not resolve URL \"") + url + | 349 std::string("could not resolve URL \"") + url + |
350 "\" relative to \"" + | 350 "\" relative to \"" + |
351 plugin_base_url_.possibly_invalid_spec() + "\"."); | 351 plugin_base_url_.possibly_invalid_spec() + "\"."); |
352 return false; | 352 return false; |
353 } | 353 } |
354 | 354 |
355 void NexeLoadManager::ProcessNaClManifest(const std::string& program_url) { | 355 void NexeLoadManager::ProcessNaClManifest(const std::string& program_url) { |
| 356 program_url_ = program_url; |
356 GURL gurl(program_url); | 357 GURL gurl(program_url); |
357 DCHECK(gurl.is_valid()); | 358 DCHECK(gurl.is_valid()); |
358 if (gurl.is_valid()) | 359 if (gurl.is_valid()) |
359 is_installed_ = gurl.SchemeIs("chrome-extension"); | 360 is_installed_ = gurl.SchemeIs("chrome-extension"); |
360 set_nacl_ready_state(PP_NACL_READY_STATE_LOADING); | 361 set_nacl_ready_state(PP_NACL_READY_STATE_LOADING); |
361 DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_PROGRESS)); | 362 DispatchProgressEvent(pp_instance_, ProgressEvent(PP_NACL_EVENT_PROGRESS)); |
362 } | 363 } |
363 | 364 |
364 std::string NexeLoadManager::GetManifestURLArgument() const { | 365 std::string NexeLoadManager::GetManifestURLArgument() const { |
365 std::string manifest_url; | 366 std::string manifest_url; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // to provide error handling. | 417 // to provide error handling. |
417 } | 418 } |
418 | 419 |
419 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { | 420 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { |
420 base::StringTokenizer t(crash_log, "\n"); | 421 base::StringTokenizer t(crash_log, "\n"); |
421 while (t.GetNext()) | 422 while (t.GetNext()) |
422 LogToConsole(t.token()); | 423 LogToConsole(t.token()); |
423 } | 424 } |
424 | 425 |
425 } // namespace nacl | 426 } // namespace nacl |
OLD | NEW |