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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 10675007: Move each permission classes to its own files in extensions/permissions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 unified diff | Download patch
OLDNEW
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/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // - The document is running Web UI. 491 // - The document is running Web UI.
492 WebSecurityOrigin origin = document.securityOrigin(); 492 WebSecurityOrigin origin = document.securityOrigin();
493 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme)) 493 if (EqualsASCII(origin.protocol(), chrome::kChromeUIScheme))
494 return true; 494 return true;
495 const extensions::Extension* extension = 495 const extensions::Extension* extension =
496 extension_dispatcher_->extensions()->GetExtensionOrAppByURL( 496 extension_dispatcher_->extensions()->GetExtensionOrAppByURL(
497 ExtensionURLInfo(origin, document.url())); 497 ExtensionURLInfo(origin, document.url()));
498 if (!extension) 498 if (!extension)
499 return false; 499 return false;
500 return (extension_dispatcher_->IsExtensionActive(extension->id()) && 500 return (extension_dispatcher_->IsExtensionActive(extension->id()) &&
501 extension->HasAPIPermission(ExtensionAPIPermission::kExperimental)); 501 extension->HasAPIPermission(extensions::APIPermission::kExperimental));
miket_OOO 2012/06/26 23:23:44 Whitespace! (Sorry to be so strict, but someone el
Peng 2012/06/26 23:32:35 If use old indentation, this Line will be more tha
Peng 2012/06/26 23:42:53 Done.
502 } 502 }
503 503
504 bool ChromeRenderViewObserver::allowWebComponents(const WebDocument& document, 504 bool ChromeRenderViewObserver::allowWebComponents(const WebDocument& document,
505 bool defaultValue) { 505 bool defaultValue) {
506 if (defaultValue) 506 if (defaultValue)
507 return true; 507 return true;
508 return IsExperimentalWebFeatureAllowed(document); 508 return IsExperimentalWebFeatureAllowed(document);
509 } 509 }
510 510
511 static void SendInsecureContentSignal(int signal) { 511 static void SendInsecureContentSignal(int signal) {
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 reinterpret_cast<const unsigned char*>(&data[0]); 1072 reinterpret_cast<const unsigned char*>(&data[0]);
1073 1073
1074 return decoder.Decode(src_data, data.size()); 1074 return decoder.Decode(src_data, data.size());
1075 } 1075 }
1076 return SkBitmap(); 1076 return SkBitmap();
1077 } 1077 }
1078 1078
1079 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { 1079 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) {
1080 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); 1080 return (strict_security_hosts_.find(host) != strict_security_hosts_.end());
1081 } 1081 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698