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

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

Issue 168953002: Cleanup: Move kChromeDevToolsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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/content_settings_observer.h" 5 #include "chrome/renderer/content_settings_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 const GURL& document_url) { 629 const GURL& document_url) {
630 if (document_url == GURL(content::kUnreachableWebDataURL)) 630 if (document_url == GURL(content::kUnreachableWebDataURL))
631 return true; 631 return true;
632 632
633 if (origin.isUnique()) 633 if (origin.isUnique())
634 return false; // Uninitialized document? 634 return false; // Uninitialized document?
635 635
636 if (EqualsASCII(origin.protocol(), content::kChromeUIScheme)) 636 if (EqualsASCII(origin.protocol(), content::kChromeUIScheme))
637 return true; // Browser UI elements should still work. 637 return true; // Browser UI elements should still work.
638 638
639 if (EqualsASCII(origin.protocol(), chrome::kChromeDevToolsScheme)) 639 if (EqualsASCII(origin.protocol(), content::kChromeDevToolsScheme))
640 return true; // DevTools UI elements should still work. 640 return true; // DevTools UI elements should still work.
641 641
642 if (EqualsASCII(origin.protocol(), extensions::kExtensionScheme)) 642 if (EqualsASCII(origin.protocol(), extensions::kExtensionScheme))
643 return true; 643 return true;
644 644
645 // TODO(creis, fsamuel): Remove this once the concept of swapped out 645 // TODO(creis, fsamuel): Remove this once the concept of swapped out
646 // RenderFrames goes away. 646 // RenderFrames goes away.
647 if (document_url == GURL(content::kSwappedOutURL)) 647 if (document_url == GURL(content::kSwappedOutURL))
648 return true; 648 return true;
649 649
650 // If the scheme is file:, an empty file name indicates a directory listing, 650 // If the scheme is file:, an empty file name indicates a directory listing,
651 // which requires JavaScript to function properly. 651 // which requires JavaScript to function properly.
652 if (EqualsASCII(origin.protocol(), content::kFileScheme)) { 652 if (EqualsASCII(origin.protocol(), content::kFileScheme)) {
653 return document_url.SchemeIs(content::kFileScheme) && 653 return document_url.SchemeIs(content::kFileScheme) &&
654 document_url.ExtractFileName().empty(); 654 document_url.ExtractFileName().empty();
655 } 655 }
656 656
657 return false; 657 return false;
658 } 658 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/content_settings_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698