-
Notifications
You must be signed in to change notification settings - Fork 887
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve licensing notice (fixes brave/brave-browser#6605)
This add a link to the license, build instructions as well as the corresponding source code.
- Loading branch information
Showing
5 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/ui/webui/settings/brave_about_handler.h" | ||
|
||
#include "base/strings/string16.h" | ||
#include "base/strings/utf_string_conversions.h" | ||
#include "brave/browser/version_info.h" | ||
#include "brave/grit/brave_generated_resources.h" | ||
#include "chrome/browser/ui/webui/settings/about_handler.h" | ||
#include "chrome/common/url_constants.h" | ||
#include "content/public/browser/web_ui_data_source.h" | ||
#include "ui/base/l10n/l10n_util.h" | ||
|
||
namespace { | ||
|
||
const char kBraveBuildInstructionsUrl[] = | ||
"https://github.com/brave/brave-browser/wiki"; | ||
const char kBraveLicenseUrl[] = "https://mozilla.org/MPL/2.0/"; | ||
const char kBraveReleaseTagPrefix[] = | ||
"https://github.com/brave/brave-browser/releases/tag/v"; | ||
|
||
} // namespace | ||
|
||
namespace settings { | ||
|
||
AboutHandler* BraveAboutHandler::Create(content::WebUIDataSource* html_source, | ||
Profile* profile) { | ||
AboutHandler* handler = AboutHandler::Create(html_source, profile); | ||
base::string16 license = l10n_util::GetStringFUTF16( | ||
IDS_BRAVE_VERSION_UI_LICENSE, base::ASCIIToUTF16(kBraveLicenseUrl), | ||
base::ASCIIToUTF16(chrome::kChromeUICreditsURL), | ||
base::ASCIIToUTF16(kBraveBuildInstructionsUrl), | ||
base::ASCIIToUTF16(kBraveReleaseTagPrefix) + | ||
base::UTF8ToUTF16( | ||
version_info::GetBraveVersionWithoutChromiumMajorVersion())); | ||
html_source->AddString("aboutProductLicense", license); | ||
return handler; | ||
} | ||
|
||
} // namespace settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_UI_WEBUI_SETTINGS_BRAVE_ABOUT_HANDLER_H_ | ||
#define BRAVE_BROWSER_UI_WEBUI_SETTINGS_BRAVE_ABOUT_HANDLER_H_ | ||
|
||
class Profile; | ||
|
||
namespace content { | ||
class WebUIDataSource; | ||
} | ||
|
||
namespace settings { | ||
|
||
class AboutHandler; | ||
|
||
class BraveAboutHandler { | ||
public: | ||
static AboutHandler* Create(content::WebUIDataSource* html_source, | ||
Profile* profile); | ||
}; | ||
|
||
} // namespace settings | ||
|
||
#endif // BRAVE_BROWSER_UI_WEBUI_SETTINGS_BRAVE_ABOUT_HANDLER_H_ |
11 changes: 11 additions & 0 deletions
11
chromium_src/chrome/browser/ui/webui/settings/settings_ui.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/ui/webui/settings/brave_about_handler.h" | ||
#include "chrome/browser/ui/webui/settings/about_handler.h" | ||
|
||
#define AboutHandler BraveAboutHandler | ||
#include "../../../../../../../chrome/browser/ui/webui/settings/settings_ui.cc" | ||
#undef AboutHandler |