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

Side by Side Diff: gin/shell/gin_main.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « gin/modules/module_registry_unittest.cc ('k') | gpu/BUILD.gn » ('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 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "gin/array_buffer.h" 11 #include "gin/array_buffer.h"
12 #include "gin/modules/console.h" 12 #include "gin/modules/console.h"
13 #include "gin/modules/module_runner_delegate.h" 13 #include "gin/modules/module_runner_delegate.h"
14 #include "gin/public/isolate_holder.h" 14 #include "gin/public/isolate_holder.h"
15 #include "gin/test/file_runner.h"
16 #include "gin/try_catch.h" 15 #include "gin/try_catch.h"
17 16
18 namespace gin { 17 namespace gin {
19 namespace { 18 namespace {
20 19
21 std::string Load(const base::FilePath& path) { 20 std::string Load(const base::FilePath& path) {
22 std::string source; 21 std::string source;
23 if (!ReadFileToString(path, &source)) 22 if (!ReadFileToString(path, &source))
24 LOG(FATAL) << "Unable to read " << path.LossyDisplayName(); 23 LOG(FATAL) << "Unable to read " << path.LossyDisplayName();
25 return source; 24 return source;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 CommandLine::StringVector args = CommandLine::ForCurrentProcess()->GetArgs(); 80 CommandLine::StringVector args = CommandLine::ForCurrentProcess()->GetArgs();
82 for (CommandLine::StringVector::const_iterator it = args.begin(); 81 for (CommandLine::StringVector::const_iterator it = args.begin();
83 it != args.end(); ++it) { 82 it != args.end(); ++it) {
84 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 83 base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
85 gin::Run, runner.GetWeakPtr(), base::FilePath(*it))); 84 gin::Run, runner.GetWeakPtr(), base::FilePath(*it)));
86 } 85 }
87 86
88 message_loop.RunUntilIdle(); 87 message_loop.RunUntilIdle();
89 return 0; 88 return 0;
90 } 89 }
OLDNEW
« no previous file with comments | « gin/modules/module_registry_unittest.cc ('k') | gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698