Removed broken custom import scheme.

It was never used, because the Polymer elements that could be imported
using it would themselves import using relative (ie. file) schemes,
which would then fail. Since LOOT now Vulcanizes its imports, the whole
process is now unnecessary anyway.
This commit is contained in:
Oliver Hamlet
2015-02-01 14:21:49 +00:00
parent eee2bfac7c
commit 15959c271d
4 changed files with 3 additions and 19 deletions
-1
View File
@@ -37,7 +37,6 @@ namespace loot {
//Common paths.
const boost::filesystem::path g_path_readme = boost::filesystem::current_path() / "docs" / "LOOT Readme.html";
const boost::filesystem::path g_path_report = boost::filesystem::current_path() / "resources" / "report" / "index.html";
const boost::filesystem::path g_path_imports = boost::filesystem::current_path() / "resources" / "report";
const boost::filesystem::path g_path_l10n = boost::filesystem::current_path() / "resources" / "l10n";
#ifdef _WIN32
const boost::filesystem::path g_path_local = GetLocalAppDataPath() / "LOOT";
-1
View File
@@ -38,7 +38,6 @@ namespace loot {
//Common paths.
extern const boost::filesystem::path g_path_readme;
extern const boost::filesystem::path g_path_report;
extern const boost::filesystem::path g_path_imports;
extern const boost::filesystem::path g_path_l10n;
extern const boost::filesystem::path g_path_local;
extern const boost::filesystem::path g_path_settings;
-4
View File
@@ -64,9 +64,6 @@ namespace loot {
// Disable spell checking.
command_line->AppendSwitch("--disable-spell-checking");
// Temporary workaround until I figure out what's wrong with my custom URL handling.
command_line->AppendSwitch("--allow-file-access-from-files");
}
}
@@ -100,7 +97,6 @@ namespace loot {
// Register the custom "loot" scheme handlers.
CefRegisterSchemeHandlerFactory("loot", "l10n", new LootSchemeHandlerFactory());
CefRegisterSchemeHandlerFactory("loot", "import", new LootSchemeHandlerFactory());
// Specify CEF browser settings here.
CefBrowserSettings browser_settings;
+3 -13
View File
@@ -45,19 +45,9 @@ namespace loot {
CefRefPtr<CefRequest> request) {
BOOST_LOG_TRIVIAL(trace) << "Handling custom scheme: " << string(request->GetURL());
/* Two custom URLs are possible:
loot://l10n/<l10n path>
loot://import/<import filename>
*/
// Get the path from the custom URL.
string file;
if (boost::starts_with(request->GetURL().ToString(), "loot://l10n/")) {
file = (g_path_l10n / request->GetURL().ToString().substr(12)).string();
}
else {
file = (g_path_imports / request->GetURL().ToString().substr(14)).string();
}
// Get the path from the custom URL, which is of the form
// loot://l10n/<l10n path>
string file = (g_path_l10n / request->GetURL().ToString().substr(12)).string();
CefResponse::HeaderMap headers;
headers.emplace("Access-Control-Allow-Origin", "*");