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

Side by Side Diff: extensions/common/permissions/permissions_data.cc

Issue 1414223005: Remove URLs from chrome.tabs.executeScript permission warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698