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

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

Issue 8312005: Ignore paths when matching patterns for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix silly typo. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 frame, extension_name.utf8(), extension_group); 423 frame, extension_name.utf8(), extension_group);
424 } 424 }
425 425
426 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { 426 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) {
427 return content_settings_->AllowStorage(frame, local); 427 return content_settings_->AllowStorage(frame, local);
428 } 428 }
429 429
430 bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame, 430 bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame,
431 bool default_value) { 431 bool default_value) {
432 bool allowed = false; 432 bool allowed = false;
433 // TODO(dcheng): Should we consider a toURL() method on WebSecurityOrigin?
433 Send(new ChromeViewHostMsg_CanTriggerClipboardRead( 434 Send(new ChromeViewHostMsg_CanTriggerClipboardRead(
434 routing_id(), frame->document().url(), &allowed)); 435 routing_id(), GURL(frame->document().securityOrigin().toString().utf8()),
436 &allowed));
435 return allowed; 437 return allowed;
436 } 438 }
437 439
438 bool ChromeRenderViewObserver::allowWriteToClipboard(WebFrame* frame, 440 bool ChromeRenderViewObserver::allowWriteToClipboard(WebFrame* frame,
439 bool default_value) { 441 bool default_value) {
440 bool allowed = false; 442 bool allowed = false;
441 Send(new ChromeViewHostMsg_CanTriggerClipboardWrite( 443 Send(new ChromeViewHostMsg_CanTriggerClipboardWrite(
442 routing_id(), frame->document().url(), &allowed)); 444 routing_id(), GURL(frame->document().securityOrigin().toString().utf8()),
445 &allowed));
443 return allowed; 446 return allowed;
444 } 447 }
445 448
446 bool ChromeRenderViewObserver::allowDisplayingInsecureContent( 449 bool ChromeRenderViewObserver::allowDisplayingInsecureContent(
447 WebKit::WebFrame* frame, 450 WebKit::WebFrame* frame,
448 bool allowed_per_settings, 451 bool allowed_per_settings,
449 const WebKit::WebSecurityOrigin& origin, 452 const WebKit::WebSecurityOrigin& origin,
450 const WebKit::WebURL& url) { 453 const WebKit::WebURL& url) {
451 UMA_HISTOGRAM_ENUMERATION(kSSLInsecureContent, 454 UMA_HISTOGRAM_ENUMERATION(kSSLInsecureContent,
452 INSECURE_CONTENT_DISPLAY, 455 INSECURE_CONTENT_DISPLAY,
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 // Decode the favicon using WebKit's image decoder. 1089 // Decode the favicon using WebKit's image decoder.
1087 webkit_glue::ImageDecoder decoder( 1090 webkit_glue::ImageDecoder decoder(
1088 gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize)); 1091 gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize));
1089 const unsigned char* src_data = 1092 const unsigned char* src_data =
1090 reinterpret_cast<const unsigned char*>(&data[0]); 1093 reinterpret_cast<const unsigned char*>(&data[0]);
1091 1094
1092 return decoder.Decode(src_data, data.size()); 1095 return decoder.Decode(src_data, data.size());
1093 } 1096 }
1094 return SkBitmap(); 1097 return SkBitmap();
1095 } 1098 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698