Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
enable chrome.i18n.getAcceptLanguages
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Jun 14, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7ba56bd commit f3df64c
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions atom/browser/extensions/atom_extensions_browser_client.cc
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@
#include "base/version.h"
#include "brave/browser/brave_browser_context.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h"
#include "chrome/browser/extensions/api/i18n/i18n_api.h"
#include "chrome/browser/extensions/chrome_component_extension_resource_manager.h"
#include "chrome/browser/extensions/chrome_extension_api_frame_id_map_helper.h"
#include "chrome/browser/extensions/chrome_url_request_util.h"
@@ -67,11 +69,9 @@
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h"
#include "extensions/common/file_util.h"
#include "net/url_request/url_request_simple_job.h"


#include "electron/brave/common/extensions/api/generated_api_registration.h"
#include "extensions/browser/api/generated_api_registration.h"

@@ -445,6 +445,11 @@ void AtomExtensionsBrowserClient::RegisterExtensionFunctions(
api::CryptotokenPrivateCanOriginAssertAppIdFunction::
histogram_value(),
},
{
NewExtensionFunction<I18nGetAcceptLanguagesFunction>,
I18nGetAcceptLanguagesFunction::function_name(),
I18nGetAcceptLanguagesFunction::histogram_value(),
},
};

for (const auto& entry : chromeEntries) {
2 changes: 2 additions & 0 deletions chromium_src/BUILD.gn
Original file line number Diff line number Diff line change
@@ -545,6 +545,8 @@ source_set("browser") {
"//chrome/browser/extensions/extension_tab_util.h",
"//chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc",
"//chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h",
"//chrome/browser/extensions/api/i18n/i18n_api.cc",
"//chrome/browser/extensions/api/i18n/i18n_api.h",
"chrome/browser/extensions/api/messaging/incognito_connectability.cc",
"//chrome/browser/extensions/api/messaging/incognito_connectability.h",
"//chrome/browser/extensions/api/messaging/chrome_messaging_delegate.cc",

0 comments on commit f3df64c

Please sign in to comment.