| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/common/permissions/permissions_data.h" | 5 #include "extensions/common/permissions/permissions_data.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/public/common/url_constants.h" | 8 #include "content/public/common/url_constants.h" |
| 9 #include "extensions/common/constants.h" | 9 #include "extensions/common/constants.h" |
| 10 #include "extensions/common/error_utils.h" | 10 #include "extensions/common/error_utils.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 if (HasTabSpecificPermissionToExecuteScript(tab_id, document_url)) | 342 if (HasTabSpecificPermissionToExecuteScript(tab_id, document_url)) |
| 343 return ACCESS_ALLOWED; | 343 return ACCESS_ALLOWED; |
| 344 | 344 |
| 345 if (permitted_url_patterns.MatchesURL(document_url)) | 345 if (permitted_url_patterns.MatchesURL(document_url)) |
| 346 return ACCESS_ALLOWED; | 346 return ACCESS_ALLOWED; |
| 347 | 347 |
| 348 if (withheld_url_patterns.MatchesURL(document_url)) | 348 if (withheld_url_patterns.MatchesURL(document_url)) |
| 349 return ACCESS_WITHHELD; | 349 return ACCESS_WITHHELD; |
| 350 | 350 |
| 351 if (error) { | 351 if (error) |
| 352 *error = ErrorUtils::FormatErrorMessage(manifest_errors::kCannotAccessPage, | 352 *error = manifest_errors::kCannotAccessPage; |
| 353 document_url.spec()); | 353 |
| 354 } | |
| 355 return ACCESS_DENIED; | 354 return ACCESS_DENIED; |
| 356 } | 355 } |
| 357 | 356 |
| 358 } // namespace extensions | 357 } // namespace extensions |
| OLD | NEW |