Commit 79250b0a authored by Shik Chen's avatar Shik Chen Committed by Commit Bot

CCA: Move google-analytics library to src/js/lib/

This CL creates a dedicated folder to store external libraries, so it's
easier to track and update the dependencies in the future, as we are
going to add other libraries.

Bug: 1058325
Test: Open CCA and check there is no error in console.
Change-Id: I98117d55a46323df827e78e692342b81bb94361c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105668
Commit-Queue: Shik Chen <shik@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Reviewed-by: default avatarWei Lee <wtlee@chromium.org>
Auto-Submit: Shik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750904}
parent 7e39a8f1
...@@ -23,6 +23,7 @@ group("chrome_camera_app") { ...@@ -23,6 +23,7 @@ group("chrome_camera_app") {
":chrome_camera_app_js", ":chrome_camera_app_js",
":chrome_camera_app_js_browser_proxy", ":chrome_camera_app_js_browser_proxy",
":chrome_camera_app_js_device", ":chrome_camera_app_js_device",
":chrome_camera_app_js_lib",
":chrome_camera_app_js_models", ":chrome_camera_app_js_models",
":chrome_camera_app_js_mojo", ":chrome_camera_app_js_mojo",
":chrome_camera_app_js_views", ":chrome_camera_app_js_views",
...@@ -100,7 +101,6 @@ copy("chrome_camera_app_js") { ...@@ -100,7 +101,6 @@ copy("chrome_camera_app_js") {
"src/js/background_ops.js", "src/js/background_ops.js",
"src/js/chrome_util.js", "src/js/chrome_util.js",
"src/js/gallerybutton.js", "src/js/gallerybutton.js",
"src/js/google-analytics-bundle.js",
"src/js/intent.js", "src/js/intent.js",
"src/js/main.js", "src/js/main.js",
"src/js/metrics.js", "src/js/metrics.js",
...@@ -138,6 +138,14 @@ copy("chrome_camera_app_js_device") { ...@@ -138,6 +138,14 @@ copy("chrome_camera_app_js_device") {
outputs = [ "$chrome_camera_app_dir/js/device/{{source_file_part}}" ] outputs = [ "$chrome_camera_app_dir/js/device/{{source_file_part}}" ]
} }
copy("chrome_camera_app_js_lib") {
sources = [
"src/js/lib/google-analytics-bundle.js",
]
outputs = [ "$chrome_camera_app_dir/js/lib/{{source_file_part}}" ]
}
copy("chrome_camera_app_js_models") { copy("chrome_camera_app_js_models") {
sources = [ sources = [
"src/js/models/file_video_saver.js", "src/js/models/file_video_saver.js",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<release seq="1"> <release seq="1">
<structures> <structures>
<structure name="IDR_CAMERA_BACKGROUND_JS" file="src/js/background.js" type="chrome_html" /> <structure name="IDR_CAMERA_BACKGROUND_JS" file="src/js/background.js" type="chrome_html" />
<structure name="IDR_CAMERA_BUNDLE_JS" file="src/js/google-analytics-bundle.js" type="chrome_html" /> <structure name="IDR_CAMERA_BUNDLE_JS" file="src/js/lib/google-analytics-bundle.js" type="chrome_html" />
<structure name="IDR_CAMERA_CAMERA3_DEVICE_INFO_JS" file="src/js/device/camera3_device_info.js" type="chrome_html" /> <structure name="IDR_CAMERA_CAMERA3_DEVICE_INFO_JS" file="src/js/device/camera3_device_info.js" type="chrome_html" />
<structure name="IDR_CAMERA_CAMERA_JS" file="src/js/views/camera.js" type="chrome_html" /> <structure name="IDR_CAMERA_CAMERA_JS" file="src/js/views/camera.js" type="chrome_html" />
<structure name="IDR_CAMERA_CAMERA_INTENT_JS" file="src/js/views/camera_intent.js" type="chrome_html" /> <structure name="IDR_CAMERA_CAMERA_INTENT_JS" file="src/js/views/camera_intent.js" type="chrome_html" />
......
# google-analytics-bundle.js
From https://github.com/googlearchive/chrome-platform-analytics
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
/* eslint-disable */
(function() { 'use strict';var h,aa=aa||{},k=this,m=function(a){return void 0!==a},ba=function(){},ca=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&& (function() { 'use strict';var h,aa=aa||{},k=this,m=function(a){return void 0!==a},ba=function(){},ca=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&
"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},n=function(a){return"array"==ca(a)},da=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},ea=function(a){return"number"==typeof a},q=function(a){return"function"==ca(a)},r=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},fa= "undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},n=function(a){return"array"==ca(a)},da=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},ea=function(a){return"number"==typeof a},q=function(a){return"function"==ca(a)},r=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},fa=
function(a,b,c){return a.call.apply(a.bind,arguments)},ga=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return t.apply(null,arguments)},ha=function(a,b){var c=Array.prototype.slice.call(arguments, function(a,b,c){return a.call.apply(a.bind,arguments)},ga=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return t.apply(null,arguments)},ha=function(a,b){var c=Array.prototype.slice.call(arguments,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
found in the LICENSE file. --> found in the LICENSE file. -->
<html> <html>
<head> <head>
<script src="../js/google-analytics-bundle.js"></script> <script src="../js/lib/google-analytics-bundle.js"></script>
<script src="../js/mojo/mojo_bindings_lite.js"></script> <script src="../js/mojo/mojo_bindings_lite.js"></script>
<script src="../js/mojo/camera_intent.mojom-lite.js"></script> <script src="../js/mojo/camera_intent.mojom-lite.js"></script>
<script src="../js/mojo/camera_app_helper.mojom-lite.js"></script> <script src="../js/mojo/camera_app_helper.mojom-lite.js"></script>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<title>&#xfeff;</title> <title>&#xfeff;</title>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" href="../css/main.css"> <link rel="stylesheet" href="../css/main.css">
<script src="../js/google-analytics-bundle.js"></script> <script src="../js/lib/google-analytics-bundle.js"></script>
<script src="../js/mojo/mojo_bindings_lite.js"></script> <script src="../js/mojo/mojo_bindings_lite.js"></script>
<script src="../js/mojo/camera_metadata_tags.mojom-lite.js"></script> <script src="../js/mojo/camera_metadata_tags.mojom-lite.js"></script>
<script src="../js/mojo/camera_metadata.mojom-lite.js"></script> <script src="../js/mojo/camera_metadata.mojom-lite.js"></script>
......
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