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

Side by Side Diff: sky/engine/v8_inspector/read_from_source_tree.cc

Issue 922053002: Remove unused V8 integration code in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/v8_inspector/read_from_source_tree.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/files/file_path.h"
6 #include "base/files/file_util.h"
7 #include "base/path_service.h"
8 #include "sky/engine/config.h"
9 #include "sky/engine/v8_inspector/read_from_source_tree.h"
10
11 namespace inspector {
12
13 // TODO(eseidel): This is a horrible hack and only works when run
14 // inside its source tree! crbug.com/434513
15 void ReadFileFromSourceTree(const char* name, std::string* buffer) {
16 CHECK(buffer);
17 base::FilePath root_dir;
18 PathService::Get(base::DIR_SOURCE_ROOT, &root_dir);
19 base::FilePath path = root_dir.AppendASCII("sky");
20 path = path.AppendASCII("engine").AppendASCII("v8_inspector");
21
22 if (std::string("InjectedScriptSource.js") == name)
23 path = path.AppendASCII(name);
24 else if (std::string("DebuggerScript.js") == name)
25 path = path.AppendASCII(name);
26 else
27 CHECK(false);
28
29 base::ReadFileToString(path, buffer);
30 CHECK(!buffer->empty());
31 }
32
33 } // namespace inspector
OLDNEW
« no previous file with comments | « sky/engine/v8_inspector/read_from_source_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698