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

Side by Side Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 523137: Also match against the query string if present. (Closed)
Patch Set: updates Created 10 years, 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser/net/chrome_url_request_context.h" 5 #include "chrome/browser/net/chrome_url_request_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 // Requests which don't go through ResourceDispatcherHost don't have privacy 683 // Requests which don't go through ResourceDispatcherHost don't have privacy
684 // blacklist request data. 684 // blacklist request data.
685 if (!request_info) 685 if (!request_info)
686 return true; 686 return true;
687 const BlacklistManager* blacklist_manager = 687 const BlacklistManager* blacklist_manager =
688 request_info->GetBlacklistManager(); 688 request_info->GetBlacklistManager();
689 // TODO(phajdan.jr): remove the NULL check when blacklists are stable. 689 // TODO(phajdan.jr): remove the NULL check when blacklists are stable.
690 if (!blacklist_manager) 690 if (!blacklist_manager)
691 return NULL; 691 return NULL;
692 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist(); 692 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist();
693 scoped_ptr<Blacklist::Match> match(blacklist->findMatch(request->url())); 693 scoped_ptr<Blacklist::Match> match(blacklist->FindMatch(request->url()));
694 if (!match.get()) 694 if (!match.get())
695 return true; 695 return true;
696 if (match->attributes() & Blacklist::kDontStoreCookies) { 696 if (match->attributes() & Blacklist::kDontStoreCookies) {
697 NotificationService::current()->Notify( 697 NotificationService::current()->Notify(
698 NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED, 698 NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED,
699 Source<const ChromeURLRequestContext>(this), 699 Source<const ChromeURLRequestContext>(this),
700 Details<const URLRequest>(request)); 700 Details<const URLRequest>(request));
701 701
702 cookie->clear(); 702 cookie->clear();
703 return false; 703 return false;
(...skipping 11 matching lines...) Expand all
715 // Requests which don't go through ResourceDispatcherHost don't have privacy 715 // Requests which don't go through ResourceDispatcherHost don't have privacy
716 // blacklist request data. 716 // blacklist request data.
717 if (!request_info) 717 if (!request_info)
718 return true; 718 return true;
719 const BlacklistManager* blacklist_manager = 719 const BlacklistManager* blacklist_manager =
720 request_info->GetBlacklistManager(); 720 request_info->GetBlacklistManager();
721 // TODO(phajdan.jr): remove the NULL check when blacklists are stable. 721 // TODO(phajdan.jr): remove the NULL check when blacklists are stable.
722 if (!blacklist_manager) 722 if (!blacklist_manager)
723 return NULL; 723 return NULL;
724 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist(); 724 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist();
725 scoped_ptr<Blacklist::Match> match(blacklist->findMatch(request->url())); 725 scoped_ptr<Blacklist::Match> match(blacklist->FindMatch(request->url()));
726 if (!match.get()) 726 if (!match.get())
727 return true; 727 return true;
728 if (match->attributes() & Blacklist::kDontSendCookies) { 728 if (match->attributes() & Blacklist::kDontSendCookies) {
729 NotificationService::current()->Notify( 729 NotificationService::current()->Notify(
730 NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED, 730 NotificationType::BLACKLIST_NONVISUAL_RESOURCE_BLOCKED,
731 Source<const ChromeURLRequestContext>(this), 731 Source<const ChromeURLRequestContext>(this),
732 Details<const URLRequest>(request)); 732 Details<const URLRequest>(request));
733 733
734 return false; 734 return false;
735 } 735 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 } 962 }
963 963
964 if (command_line.HasSwitch(switches::kProxyBypassList)) { 964 if (command_line.HasSwitch(switches::kProxyBypassList)) {
965 proxy_config->ParseNoProxyList( 965 proxy_config->ParseNoProxyList(
966 WideToASCII(command_line.GetSwitchValue( 966 WideToASCII(command_line.GetSwitchValue(
967 switches::kProxyBypassList))); 967 switches::kProxyBypassList)));
968 } 968 }
969 969
970 return proxy_config; 970 return proxy_config;
971 } 971 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/privacy_blacklist/blacklist.h » ('j') | chrome/browser/privacy_blacklist/blacklist.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698