Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/renderer/extensions/extension_dispatcher.h" | 5 #include "chrome/renderer/extensions/extension_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/common/child_process_logging.h" | 8 #include "chrome/common/child_process_logging.h" |
| 9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 WebString::fromUTF8(chrome::kChromeUIScheme), | 392 WebString::fromUTF8(chrome::kChromeUIScheme), |
| 393 WebString::fromUTF8(chrome::kChromeUIExtensionIconHost), | 393 WebString::fromUTF8(chrome::kChromeUIExtensionIconHost), |
| 394 false); | 394 false); |
| 395 } | 395 } |
| 396 | 396 |
| 397 UpdateOriginPermissions(UpdatedExtensionPermissionsInfo::ADDED, | 397 UpdateOriginPermissions(UpdatedExtensionPermissionsInfo::ADDED, |
| 398 extension, | 398 extension, |
| 399 extension->GetActivePermissions()->explicit_hosts()); | 399 extension->GetActivePermissions()->explicit_hosts()); |
| 400 } | 400 } |
| 401 | 401 |
| 402 // TODO(ericu): What needs to be done here? Do filesystem URLs enter into | |
| 403 // extension permissions at all? | |
|
Aaron Boodman
2012/01/19 23:47:37
Nothing needs to be done here.
| |
| 402 void ExtensionDispatcher::UpdateOriginPermissions( | 404 void ExtensionDispatcher::UpdateOriginPermissions( |
| 403 UpdatedExtensionPermissionsInfo::Reason reason, | 405 UpdatedExtensionPermissionsInfo::Reason reason, |
| 404 const Extension* extension, | 406 const Extension* extension, |
| 405 const URLPatternSet& origins) { | 407 const URLPatternSet& origins) { |
| 406 for (URLPatternSet::const_iterator i = origins.begin(); | 408 for (URLPatternSet::const_iterator i = origins.begin(); |
| 407 i != origins.end(); ++i) { | 409 i != origins.end(); ++i) { |
| 408 const char* schemes[] = { | 410 const char* schemes[] = { |
| 409 chrome::kHttpScheme, | 411 chrome::kHttpScheme, |
| 410 chrome::kHttpsScheme, | 412 chrome::kHttpsScheme, |
| 411 chrome::kFileScheme, | 413 chrome::kFileScheme, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 478 | 480 |
| 479 RenderThread::Get()->RegisterExtension(extension); | 481 RenderThread::Get()->RegisterExtension(extension); |
| 480 } | 482 } |
| 481 | 483 |
| 482 void ExtensionDispatcher::OnUsingWebRequestAPI( | 484 void ExtensionDispatcher::OnUsingWebRequestAPI( |
| 483 bool adblock, bool adblock_plus, bool other) { | 485 bool adblock, bool adblock_plus, bool other) { |
| 484 webrequest_adblock_ = adblock; | 486 webrequest_adblock_ = adblock; |
| 485 webrequest_adblock_plus_ = adblock_plus; | 487 webrequest_adblock_plus_ = adblock_plus; |
| 486 webrequest_other_ = other; | 488 webrequest_other_ = other; |
| 487 } | 489 } |
| OLD | NEW |