Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2091)

Unified Diff: build/android/gyp/process_resources.py

Issue 2163993002: Split onResourcesLoaded into multiple functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/process_resources.py
diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
index 055ec8261c5686778d9269ebc9de4fd5947088bf..9e0f07f63df65ea0df3c108f675e770b50079e1e 100755
--- a/build/android/gyp/process_resources.py
+++ b/build/android/gyp/process_resources.py
@@ -224,11 +224,7 @@ public final class R {
{% if shared_resources %}
public static void onResourcesLoaded(int packageId) {
{% for resource_type in resource_types %}
- {% for e in resources[resource_type] %}
- {% if resource_type != 'styleable' and e.java_type != 'int[]' %}
- """ + create_id + """
- {% endif %}
- {% endfor %}
+ onResourcesLoaded{{ resource_type|title }}(packageId);
agrieve 2016/07/20 17:21:36 Actually, please do a add a {# comment #} here poi
{% for e in resources[resource_type] %}
{% if e.java_type == 'int[]' %}
for(int i = 0; i < {{ e.resource_type }}.{{ e.name }}.length; ++i) {
@@ -238,6 +234,15 @@ public final class R {
{% endfor %}
{% endfor %}
}
+ {% for resource_type in resource_types %}
+ private static void onResourcesLoaded{{ resource_type|title }}(int packageId) {
PEConn 2016/07/20 15:58:40 This exceeds the line length limit but in a templa
PEConn 2016/07/20 16:58:26 The line length is causing the presubmit to fail.
Bernhard Bauer 2016/07/20 17:08:33 This is just a string, right? You could construct
agrieve 2016/07/20 17:20:27 yeah, I'd say choose a shorter variable name for p
PEConn 2016/07/20 17:41:37 Done.
+ {% for e in resources[resource_type] %}
+ {% if resource_type != 'styleable' and e.java_type != 'int[]' %}
+ """ + create_id + """
+ {% endif %}
+ {% endfor %}
+ }
+ {% endfor %}
{% endif %}
}
""", trim_blocks=True, lstrip_blocks=True)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698