Commit 21707ea8 authored by Yipeng Wang's avatar Yipeng Wang Committed by Commit Bot

[about:credits] Make webview use chrome license file

This CL also deletes webview_licenses.py and related files.

Bug: 734846
Change-Id: Ib1dcdbd10c8c97993811e0c977bfaa68d0562315
Reviewed-on: https://chromium-review.googlesource.com/569075Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarPaweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: default avatarMisha Efimov <mef@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486783}
parent 82b35f8e
......@@ -180,8 +180,6 @@ repack("repack_100_percent") {
}
}
webview_license_path = "$target_gen_dir/webview_licenses.notice"
android_assets("pak_file_assets") {
sources = [
"$target_gen_dir/chrome_100_percent.pak",
......@@ -222,28 +220,10 @@ java_group("stub_assets") {
}
android_assets("license_assets") {
sources = [
webview_license_path,
]
renaming_sources = [ "$root_gen_dir/components/resources/about_credits.html" ]
renaming_destinations = [ "webview_licenses.notice" ]
deps = [
":generate_webview_license_notice",
]
}
action("generate_webview_license_notice") {
script = "tools/webview_licenses.py"
depfile = "$target_gen_dir/$target_name.d"
inputs = [
"tools/licenses_notice.tmpl",
]
outputs = [
webview_license_path,
]
args = [
"notice",
rebase_path(webview_license_path, root_build_dir),
"--depfile",
rebase_path(depfile, root_build_dir),
"//components/resources:about_credits",
]
}
......
......@@ -15,7 +15,6 @@ def CommonChecks(input_api, output_api):
input_api, output_api, pylintrc='pylintrc',
# TODO: lint these and eliminate the blacklist.
black_list=[
r'webview_licenses.py',
r'webview_repack_locales.py',
]))
return input_api.RunTests(checks, False)
......
This diff is collapsed.
......@@ -67,10 +67,6 @@ Run the following scripts:
about:credits page in Google Chrome builds.
* `src/tools/checklicenses/checklicenses.py` - See below for info on how to
handle possible failures.
* If you are adding code that will be present in the content layer, please make
sure that the license used is compliant with Android tree requirements because
this code will also be used in Android WebView. You need to run
`src/android_webview/tools/webview_licenses.py scan`
See the ["Odds n' Ends"](adding_to_third_party.md#Odds-n_Ends) Section below if
you run into any failures running these.
......@@ -187,16 +183,3 @@ __If the failure looks like ... ... the right action is to ... __
resulting binaries can't use GPL code. Ideally we just shouldn't have
those files at all in the tree. If in doubt, please ask mal@chromium.org
### Handling `webview_licenses.py` failures
__If the failure looks like ... ... the right action is to ... __
* Missing license file
* Make sure that the license file is present. It should be called 'LICENSE',
or otherwise README.chromium file must point to it explicitly.
* The following files contain a third-party license but are not in a listed
third-party directory...
* Check if it's a false positive (e.g. 'copyright' word used in a string
literal), if so, update
[src/tools/copyright_scanner/third_party_files_whitelist.txt](https://code.google.com/p/chromium/codesearch#chromium/src/tools/copyright_scanner/third_party_files_whitelist.txt)
file. Otherwise, please move the code into third_party.
#!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
import sys
import common
def main_run(args):
with common.temporary_file() as tempfile_path:
rc = common.run_command([
os.path.join(common.SRC_DIR, 'android_webview', 'tools',
'webview_licenses.py'),
'scan',
'--json', tempfile_path
])
with open(tempfile_path) as f:
results = json.load(f)
json.dump({
'valid': True,
'failures': results,
}, args.output)
return rc
def main_compile_targets(args):
json.dump([], args.output)
if __name__ == '__main__':
funcs = {
'run': main_run,
'compile_targets': main_compile_targets,
}
sys.exit(common.run_script(sys.argv[1:], funcs))
......@@ -39,7 +39,9 @@ per-file include_tracer.py=thakis@chromium.org
per-file ipc_messages_log.py=yfriedman@chromium.org
per-file licenses.py=file://tools/copyright_scanner/OWNERS
per-file licenses.py=phajdan.jr@chromium.org
per-file licenses.py=sgurun@chromium.org
per-file licenses.py=torne@chromium.org
per-file remove_stale_pyc_files.py=dtu@chromium.org
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def CheckChangeOnUpload(input_api, output_api):
return _CommonChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return _CommonChecks(input_api, output_api)
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
results = []
would_affect_tests = [
'PRESUBMIT.py',
'copyright_scanner.py',
'copyright_scanner_unittest.py'
]
need_to_run_unittests = False
for f in input_api.AffectedFiles():
if any(t for t in would_affect_tests if f.LocalPath().endswith(t)):
need_to_run_unittests = True
break
tests = [input_api.os_path.join(
input_api.PresubmitLocalPath(), 'copyright_scanner_unittest.py')]
results.extend(
input_api.canned_checks.RunUnitTests(input_api, output_api, tests))
return results
#!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
__all__ = ['copyright_scanner']
This diff is collapsed.
This diff is collapsed.
per-file licenses_test.py=file://tools/copyright_scanner/OWNERS
per-file licenses_test.py=phajdan.jr@chromium.org
per-file licenses_test.py=sgurun@chromium.org
per-file licenses_test.py=torne@chromium.org
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment