use schemes from global instead of commandline
This commit is contained in:
parent
ae297760af
commit
62cb8428fb
1 changed files with 3 additions and 9 deletions
|
@ -9,6 +9,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "atom/browser/api/atom_api_app.h"
|
#include "atom/browser/api/atom_api_app.h"
|
||||||
|
#include "atom/browser/api/atom_api_protocol.h"
|
||||||
#include "atom/browser/atom_access_token_store.h"
|
#include "atom/browser/atom_access_token_store.h"
|
||||||
#include "atom/browser/atom_browser_context.h"
|
#include "atom/browser/atom_browser_context.h"
|
||||||
#include "atom/browser/atom_browser_main_parts.h"
|
#include "atom/browser/atom_browser_main_parts.h"
|
||||||
|
@ -24,7 +25,6 @@
|
||||||
#include "base/files/file_util.h"
|
#include "base/files/file_util.h"
|
||||||
#include "base/stl_util.h"
|
#include "base/stl_util.h"
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "base/strings/string_split.h"
|
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "chrome/browser/printing/printing_message_filter.h"
|
#include "chrome/browser/printing/printing_message_filter.h"
|
||||||
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
|
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h"
|
||||||
|
@ -282,17 +282,11 @@ bool AtomBrowserClient::CanCreateWindow(
|
||||||
|
|
||||||
void AtomBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
void AtomBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||||
std::vector<std::string>* additional_schemes) {
|
std::vector<std::string>* additional_schemes) {
|
||||||
// Parse --standard-schemes=scheme1,scheme2
|
auto schemes_list = api::GetStandardSchemes();
|
||||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
if (!schemes_list.empty())
|
||||||
std::string custom_schemes = command_line->GetSwitchValueASCII(
|
|
||||||
switches::kStandardSchemes);
|
|
||||||
if (!custom_schemes.empty()) {
|
|
||||||
std::vector<std::string> schemes_list = base::SplitString(
|
|
||||||
custom_schemes, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
|
||||||
additional_schemes->insert(additional_schemes->end(),
|
additional_schemes->insert(additional_schemes->end(),
|
||||||
schemes_list.begin(),
|
schemes_list.begin(),
|
||||||
schemes_list.end());
|
schemes_list.end());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts(
|
brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts(
|
||||||
|
|
Loading…
Reference in a new issue