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

Unified Diff: net/proxy/proxy_resolver_script_data.cc

Issue 9078003: Poll PAC scripts for content changes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix dcheck reached on bot Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_resolver_script_data.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_script_data.cc
diff --git a/net/proxy/proxy_resolver_script_data.cc b/net/proxy/proxy_resolver_script_data.cc
index 0314fc3560b20c359f9ae8a48cb3510bafa06947..ff96aa4c20da12faf5ed7464246762f7e67ead80 100644
--- a/net/proxy/proxy_resolver_script_data.cc
+++ b/net/proxy/proxy_resolver_script_data.cc
@@ -45,6 +45,23 @@ const GURL& ProxyResolverScriptData::url() const {
return url_;
}
+bool ProxyResolverScriptData::Equals(
+ const ProxyResolverScriptData* other) const {
+ if (type() != other->type())
+ return false;
+
+ switch (type()) {
+ case TYPE_SCRIPT_CONTENTS:
+ return utf16() == other->utf16();
+ case TYPE_SCRIPT_URL:
+ return url() == other->url();
+ case TYPE_AUTO_DETECT:
+ return true;
+ }
+
+ return false; // Shouldn't be reached.
+}
+
ProxyResolverScriptData::ProxyResolverScriptData(Type type,
const GURL& url,
const string16& utf16)
« no previous file with comments | « net/proxy/proxy_resolver_script_data.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698