Chromium Code Reviews| Index: src/chrome_app/apis.py |
| diff --git a/src/chrome_app/apis.py b/src/chrome_app/apis.py |
| index fa09a1a32f86857e7c6d720440eceed80179ac2e..ad3933b05659ade4e6d7ba4fff3827fad24b4fcb 100755 |
| --- a/src/chrome_app/apis.py |
| +++ b/src/chrome_app/apis.py |
| @@ -42,19 +42,21 @@ import walk |
| # Regular expression matching Chrome API namespaces, e.g. chrome.tts and |
| # chrome.app.window. |
| CHROME_API_REGEX = re.compile( |
| - r'(?<![\w.])chrome\.((?:(?:app|sockets|system)\.)?\w+)') |
| + r'(?<![\w.])chrome\.(?!google)((?:(?:app|sockets|system)\.)?\w+)') |
| # Regular expression matching Chrome apps API usage, e.g. |
| # chrome.tts.speak and chrome.app.runtime.onLaunched.addListener. |
| -CHROME_API_USAGE_REGEX = re.compile(r'(?<![\w.])chrome\.((?:\w+\.)+\w+)') |
| +CHROME_API_USAGE_REGEX = re.compile( |
| + r'(?<![\w.])chrome\.(?!google)((?:\w+\.)+\w+)') |
| # Regular expression matching anything in the chrome namespace, e.g. chrome.tts |
| # or chrome.app.runtime.onLaunched.addListener. |
| -CHROME_NAMESPACE_REGEX = re.compile(r'chrome((?:\.\w+)+)') |
| +CHROME_NAMESPACE_REGEX = re.compile(r'chrome((?:\.(?!google)\w+)+)') |
| # Regular expression matching both the API and the member, assuming both exist. |
| CHROME_API_AND_MEMBER_REGEX = re.compile(r""" |
| (?<![\w.])chrome\. # In the chrome namespace |
| + (?!google) # chrome.google is not an API |
|
Matt Giuca
2016/02/11 02:17:12
Mmmmmm... I don't like this. As you said in the CL
|
| ( # Capture the full API name |
| (?:(?:app|sockets|system)\.)? # API may be part of a super-API namespace |
| \w+ # Actual API name |