WebUI: Create ui/webui/resources/cr_components

This CL:
* Creates a ui/webui/resources/cr_components/ directory
* Moves ui/webui/resources/chromes to a subdirectory of the new
  cr_components/ directory

This CL is in preparation for sharing the certificate-manager
component with a WebUI dialog on Chrome OS. The certificate-manager
component itself is not Chrome OS specific so needs to be available
for all desktop + cros platforms.

Bug: 731219
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Idc80f86114131029a79fbcc0c29cb744639fc86a
Reviewed-on: https://chromium-review.googlesource.com/600846
Commit-Queue: Steven Bennetts <[email protected]>
Reviewed-by: Demetrios Papadopoulos (OOO till Sept 11th) <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#494100}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index e56380f..cae96c3f 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -2041,9 +2041,10 @@
 
 def _CheckForRiskyJsFeatures(input_api, output_api):
   maybe_ios_js = (r"^(ios|components|ui\/webui\/resources)\/.+\.js$", )
-  chromeos_filter = (r".*chromeos.*", )
+  # 'ui/webui/resources/cr_components are not allowed on ios'
+  not_ios_filter = (r".*ui\/webui\/resources\/cr_components.*", )
   file_filter = lambda f: input_api.FilterSourceFile(f, white_list=maybe_ios_js,
-                                                     black_list=chromeos_filter)
+                                                     black_list=not_ios_filter)
   results = []
   for f in input_api.AffectedFiles(file_filter=file_filter):
     arrow_error_lines = []