summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortessamac@chromium.org <tessamac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 18:27:51 +0000
committertessamac@chromium.org <tessamac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-08 18:27:51 +0000
commitd7d4a404580f67dde70b993cac5de8f12471ab19 (patch)
tree772613b3133e924b029b07d2148961e953a59b44 /chrome
parenta61508e5901304418d0c861a79b788c6fd74a997 (diff)
downloadchromium_src-d7d4a404580f67dde70b993cac5de8f12471ab19.zip
chromium_src-d7d4a404580f67dde70b993cac5de8f12471ab19.tar.gz
chromium_src-d7d4a404580f67dde70b993cac5de8f12471ab19.tar.bz2
Update GetDistinctHost to prefer .com, .net, and .org when de-duping.
BUG=72732 TEST=trybot, unit_tests, permissions warning for https://chrome.google.com/extensions/detail/pjmjjdikcijaponjlhnibejonnjlfohg Review URL: http://codereview.chromium.org/6596085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/extensions/extension.cc64
-rw-r--r--chrome/common/extensions/extension.h6
-rw-r--r--chrome/common/extensions/extension_unittest.cc94
-rw-r--r--chrome/test/data/extensions/permissions/many-hosts.json756
4 files changed, 900 insertions, 20 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index ce77fa3..5df2a35 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -354,36 +354,64 @@ bool Extension::IsElevatedHostList(
return !new_hosts_only.empty();
}
+// Helper for GetDistinctHosts(): com > net > org > everything else.
+static bool RcdBetterThan(std::string a, std::string b) {
+ if (a == b)
+ return false;
+ if (a == "com")
+ return true;
+ if (a == "net")
+ return b != "com";
+ if (a == "org")
+ return b != "com" && b != "net";
+ return false;
+}
+
// static
std::vector<std::string> Extension::GetDistinctHosts(
const URLPatternList& host_patterns, bool include_rcd) {
- // Vector because we later want to access these by index.
- std::vector<std::string> distinct_hosts;
-
- std::set<std::string> rcd_set;
+ // Use a vector to preserve order (also faster than a map on small sets).
+ // Each item is a host split into two parts: host without RCDs and
+ // current best RCD.
+ typedef std::vector<std::pair<std::string, std::string> > HostVector;
+ HostVector hosts_best_rcd;
for (size_t i = 0; i < host_patterns.size(); ++i) {
- std::string candidate = host_patterns[i].host();
+ std::string host = host_patterns[i].host();
// Add the subdomain wildcard back to the host, if necessary.
if (host_patterns[i].match_subdomains())
- candidate = "*." + candidate;
+ host = "*." + host;
- size_t registry = net::RegistryControlledDomainService::GetRegistryLength(
- candidate, false);
- if (registry && registry != std::string::npos) {
- std::string no_rcd(candidate, 0, candidate.size() - registry);
- if (rcd_set.count(no_rcd))
- continue;
- rcd_set.insert(no_rcd);
- if (!include_rcd)
- candidate = no_rcd;
+ // If the host has an RCD, split it off so we can detect duplicates.
+ std::string rcd;
+ size_t reg_len = net::RegistryControlledDomainService::GetRegistryLength(
+ host, false);
+ if (reg_len && reg_len != std::string::npos) {
+ if (include_rcd) // else leave rcd empty
+ rcd = host.substr(host.size() - reg_len);
+ host = host.substr(0, host.size() - reg_len);
}
- if (std::find(distinct_hosts.begin(), distinct_hosts.end(), candidate) ==
- distinct_hosts.end()) {
- distinct_hosts.push_back(candidate);
+
+ // Check if we've already seen this host.
+ HostVector::iterator it = hosts_best_rcd.begin();
+ for (; it != hosts_best_rcd.end(); ++it) {
+ if (it->first == host)
+ break;
+ }
+ // If this host was found, replace the RCD if this one is better.
+ if (it != hosts_best_rcd.end()) {
+ if (include_rcd && RcdBetterThan(rcd, it->second))
+ it->second = rcd;
+ } else { // Previously unseen host, append it.
+ hosts_best_rcd.push_back(std::make_pair(host, rcd));
}
}
+ // Build up the final vector by concatenating hosts and RCDs.
+ std::vector<std::string> distinct_hosts;
+ for (HostVector::iterator it = hosts_best_rcd.begin();
+ it != hosts_best_rcd.end(); ++it)
+ distinct_hosts.push_back(it->first + it->second);
return distinct_hosts;
}
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 49850aa..498ec66 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -146,8 +146,10 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// present in the manifest to make it as easy as possible to process by
// users. In particular we disregard the scheme and path components of
// URLPatterns and de-dupe the result, which includes filtering out common
- // hosts with differing RCDs. (NOTE: when de-duping hosts with common RCDs,
- // the first pattern is returned and the rest discarded)
+ // hosts with differing RCDs (aka Registry Controlled Domains, most of which
+ // are Top Level Domains but also include exceptions like co.uk).
+ // NOTE: when de-duping hosts the preferred RCD will be returned, given this
+ // order of preference: .com, .net, .org, first in list.
static std::vector<std::string> GetDistinctHostsForDisplay(
const URLPatternList& list);
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index ab3c3a2..a32d8c8 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -1105,6 +1105,15 @@ TEST(ExtensionTest, ApiPermissions) {
}
}
+TEST(ExtensionTest, GetHostPermissionMessages_ManyHosts) {
+ scoped_refptr<Extension> extension;
+ extension = LoadManifest("permissions", "many-hosts.json");
+ std::vector<string16> warnings = extension->GetPermissionMessages();
+ ASSERT_EQ(1u, warnings.size());
+ EXPECT_EQ("Your data on www.google.com and encrypted.google.com",
+ UTF16ToUTF8(warnings[0]));
+}
+
TEST(ExtensionTest, GetDistinctHostsForDisplay) {
std::vector<std::string> expected;
expected.push_back("www.foo.com");
@@ -1194,6 +1203,9 @@ TEST(ExtensionTest, GetDistinctHostsForDisplay) {
// This is an unknown RCD, which shouldn't be uniqued out.
actual.push_back(
URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.xyzzy/path"));
+ // But it should only occur once.
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.xyzzy/path"));
expected.push_back("www.foo.xyzzy");
@@ -1214,6 +1226,88 @@ TEST(ExtensionTest, GetDistinctHostsForDisplay) {
}
}
+TEST(ExtensionTest, GetDistinctHostsForDisplay_ComIsBestRcd) {
+ URLPatternList actual;
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.ca/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.org/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.co.uk/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.net/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.jp/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.com/path"));
+
+ std::vector<std::string> expected;
+ expected.push_back("www.foo.com");
+
+ CompareLists(expected,
+ Extension::GetDistinctHostsForDisplay(actual));
+}
+
+TEST(ExtensionTest, GetDistinctHostsForDisplay_NetIs2ndBestRcd) {
+ URLPatternList actual;
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.ca/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.org/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.co.uk/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.net/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.jp/path"));
+ // No http://www.foo.com/path
+
+ std::vector<std::string> expected;
+ expected.push_back("www.foo.net");
+
+ CompareLists(expected,
+ Extension::GetDistinctHostsForDisplay(actual));
+}
+
+TEST(ExtensionTest, GetDistinctHostsForDisplay_OrgIs3rdBestRcd) {
+ URLPatternList actual;
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.ca/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.org/path"));
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.co.uk/path"));
+ // No http://www.foo.net/path
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.jp/path"));
+ // No http://www.foo.com/path
+
+ std::vector<std::string> expected;
+ expected.push_back("www.foo.org");
+
+ CompareLists(expected,
+ Extension::GetDistinctHostsForDisplay(actual));
+}
+
+TEST(ExtensionTest, GetDistinctHostsForDisplay_FirstInListIs4thBestRcd) {
+ URLPatternList actual;
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.ca/path"));
+ // No http://www.foo.org/path
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.co.uk/path"));
+ // No http://www.foo.net/path
+ actual.push_back(
+ URLPattern(URLPattern::SCHEME_HTTP, "http://www.foo.jp/path"));
+ // No http://www.foo.com/path
+
+ std::vector<std::string> expected;
+ expected.push_back("www.foo.ca");
+
+ CompareLists(expected,
+ Extension::GetDistinctHostsForDisplay(actual));
+}
+
TEST(ExtensionTest, IsElevatedHostList) {
URLPatternList list1;
URLPatternList list2;
diff --git a/chrome/test/data/extensions/permissions/many-hosts.json b/chrome/test/data/extensions/permissions/many-hosts.json
new file mode 100644
index 0000000..eb95628
--- /dev/null
+++ b/chrome/test/data/extensions/permissions/many-hosts.json
@@ -0,0 +1,756 @@
+{
+ "name": "Host Permissions",
+ "version": "1.0",
+ "description": "Test the permissions message with hosts on various RCDs.",
+ "content_scripts": [
+ {
+ "matches": [
+
+ "http://www.google.ad/",
+ "http://www.google.ad/search*",
+ "http://www.google.ad/webhp*",
+
+ "http://www.google.ae/",
+ "http://www.google.ae/search*",
+ "http://www.google.ae/webhp*",
+
+ "http://www.google.am/",
+ "http://www.google.am/search*",
+ "http://www.google.am/webhp*",
+
+ "http://www.google.as/",
+ "http://www.google.as/search*",
+ "http://www.google.as/webhp*",
+
+ "http://www.google.at/",
+ "http://www.google.at/search*",
+ "http://www.google.at/webhp*",
+
+ "http://www.google.az/",
+ "http://www.google.az/search*",
+ "http://www.google.az/webhp*",
+
+ "http://www.google.ba/",
+ "http://www.google.ba/search*",
+ "http://www.google.ba/webhp*",
+
+ "http://www.google.be/",
+ "http://www.google.be/search*",
+ "http://www.google.be/webhp*",
+
+ "http://www.google.bf/",
+ "http://www.google.bf/search*",
+ "http://www.google.bf/webhp*",
+
+ "http://www.google.bg/",
+ "http://www.google.bg/search*",
+ "http://www.google.bg/webhp*",
+
+ "http://www.google.bi/",
+ "http://www.google.bi/search*",
+ "http://www.google.bi/webhp*",
+
+ "http://www.google.bj/",
+ "http://www.google.bj/search*",
+ "http://www.google.bj/webhp*",
+
+ "http://www.google.bs/",
+ "http://www.google.bs/search*",
+ "http://www.google.bs/webhp*",
+
+ "http://www.google.by/",
+ "http://www.google.by/search*",
+ "http://www.google.by/webhp*",
+
+ "http://www.google.ca/",
+ "http://www.google.ca/search*",
+ "http://www.google.ca/webhp*",
+
+ "http://www.google.cat/",
+ "http://www.google.cat/search*",
+ "http://www.google.cat/webhp*",
+
+ "http://www.google.cd/",
+ "http://www.google.cd/search*",
+ "http://www.google.cd/webhp*",
+
+ "http://www.google.cf/",
+ "http://www.google.cf/search*",
+ "http://www.google.cf/webhp*",
+
+ "http://www.google.cg/",
+ "http://www.google.cg/search*",
+ "http://www.google.cg/webhp*",
+
+ "http://www.google.ch/",
+ "http://www.google.ch/search*",
+ "http://www.google.ch/webhp*",
+
+ "http://www.google.ci/",
+ "http://www.google.ci/search*",
+ "http://www.google.ci/webhp*",
+
+ "http://www.google.cl/",
+ "http://www.google.cl/search*",
+ "http://www.google.cl/webhp*",
+
+ "http://www.google.cm/",
+ "http://www.google.cm/search*",
+ "http://www.google.cm/webhp*",
+
+ "http://www.google.cn/",
+ "http://www.google.cn/search*",
+ "http://www.google.cn/webhp*",
+
+ "http://www.google.co.bw/",
+ "http://www.google.co.bw/search*",
+ "http://www.google.co.bw/webhp*",
+
+ "http://www.google.co.ck/",
+ "http://www.google.co.ck/search*",
+ "http://www.google.co.ck/webhp*",
+
+ "http://www.google.co.cr/",
+ "http://www.google.co.cr/search*",
+ "http://www.google.co.cr/webhp*",
+
+ "http://www.google.co.id/",
+ "http://www.google.co.id/search*",
+ "http://www.google.co.id/webhp*",
+
+ "http://www.google.co.il/",
+ "http://www.google.co.il/search*",
+ "http://www.google.co.il/webhp*",
+
+ "http://www.google.co.in/",
+ "http://www.google.co.in/search*",
+ "http://www.google.co.in/webhp*",
+
+ "http://www.google.co.jp/",
+ "http://www.google.co.jp/search*",
+ "http://www.google.co.jp/webhp*",
+
+ "http://www.google.co.ke/",
+ "http://www.google.co.ke/search*",
+ "http://www.google.co.ke/webhp*",
+
+ "http://www.google.co.kr/",
+ "http://www.google.co.kr/search*",
+ "http://www.google.co.kr/webhp*",
+
+ "http://www.google.co.ls/",
+ "http://www.google.co.ls/search*",
+ "http://www.google.co.ls/webhp*",
+
+ "http://www.google.co.ma/",
+ "http://www.google.co.ma/search*",
+ "http://www.google.co.ma/webhp*",
+
+ "http://www.google.co.mz/",
+ "http://www.google.co.mz/search*",
+ "http://www.google.co.mz/webhp*",
+
+ "http://www.google.co.nz/",
+ "http://www.google.co.nz/search*",
+ "http://www.google.co.nz/webhp*",
+
+ "http://www.google.co.th/",
+ "http://www.google.co.th/search*",
+ "http://www.google.co.th/webhp*",
+
+ "http://www.google.co.tz/",
+ "http://www.google.co.tz/search*",
+ "http://www.google.co.tz/webhp*",
+
+ "http://www.google.co.ug/",
+ "http://www.google.co.ug/search*",
+ "http://www.google.co.ug/webhp*",
+
+ "http://www.google.co.uk/",
+ "http://www.google.co.uk/search*",
+ "http://www.google.co.uk/webhp*",
+
+ "http://www.google.co.uz/",
+ "http://www.google.co.uz/search*",
+ "http://www.google.co.uz/webhp*",
+
+ "http://www.google.co.ve/",
+ "http://www.google.co.ve/search*",
+ "http://www.google.co.ve/webhp*",
+
+ "http://www.google.co.vi/",
+ "http://www.google.co.vi/search*",
+ "http://www.google.co.vi/webhp*",
+
+ "http://www.google.co.za/",
+ "http://www.google.co.za/search*",
+ "http://www.google.co.za/webhp*",
+
+ "http://www.google.co.zm/",
+ "http://www.google.co.zm/search*",
+ "http://www.google.co.zm/webhp*",
+
+ "http://www.google.co.zw/",
+ "http://www.google.co.zw/search*",
+ "http://www.google.co.zw/webhp*",
+
+ "http://www.google.com/",
+ "http://www.google.com/webhp*",
+ "http://www.google.com/search*",
+
+ "http://www.google.com.af/",
+ "http://www.google.com.af/search*",
+ "http://www.google.com.af/webhp*",
+
+ "http://www.google.com.ag/",
+ "http://www.google.com.ag/search*",
+ "http://www.google.com.ag/webhp*",
+
+ "http://www.google.com.ai/",
+ "http://www.google.com.ai/search*",
+ "http://www.google.com.ai/webhp*",
+
+ "http://www.google.com.ar/",
+ "http://www.google.com.ar/search*",
+ "http://www.google.com.ar/webhp*",
+
+ "http://www.google.com.au/",
+ "http://www.google.com.au/search*",
+ "http://www.google.com.au/webhp*",
+
+ "http://www.google.com.bd/",
+ "http://www.google.com.bd/search*",
+ "http://www.google.com.bd/webhp*",
+
+ "http://www.google.com.bh/",
+ "http://www.google.com.bh/search*",
+ "http://www.google.com.bh/webhp*",
+
+ "http://www.google.com.bn/",
+ "http://www.google.com.bn/search*",
+ "http://www.google.com.bn/webhp*",
+
+ "http://www.google.com.bo/",
+ "http://www.google.com.bo/search*",
+ "http://www.google.com.bo/webhp*",
+
+ "http://www.google.com.br/",
+ "http://www.google.com.br/search*",
+ "http://www.google.com.br/webhp*",
+
+ "http://www.google.com.by/",
+ "http://www.google.com.by/search*",
+ "http://www.google.com.by/webhp*",
+
+ "http://www.google.com.bz/",
+ "http://www.google.com.bz/search*",
+ "http://www.google.com.bz/webhp*",
+
+ "http://www.google.com.co/",
+ "http://www.google.com.co/search*",
+ "http://www.google.com.co/webhp*",
+
+ "http://www.google.com.cu/",
+ "http://www.google.com.cu/search*",
+ "http://www.google.com.cu/webhp*",
+
+ "http://www.google.com.do/",
+ "http://www.google.com.do/search*",
+ "http://www.google.com.do/webhp*",
+
+ "http://www.google.com.ec/",
+ "http://www.google.com.ec/search*",
+ "http://www.google.com.ec/webhp*",
+
+ "http://www.google.com.eg/",
+ "http://www.google.com.eg/search*",
+ "http://www.google.com.eg/webhp*",
+
+ "http://www.google.com.et/",
+ "http://www.google.com.et/search*",
+ "http://www.google.com.et/webhp*",
+
+ "http://www.google.com.fj/",
+ "http://www.google.com.fj/search*",
+ "http://www.google.com.fj/webhp*",
+
+ "http://www.google.com.gh/",
+ "http://www.google.com.gh/search*",
+ "http://www.google.com.gh/webhp*",
+
+ "http://www.google.com.gi/",
+ "http://www.google.com.gi/search*",
+ "http://www.google.com.gi/webhp*",
+
+ "http://www.google.com.gt/",
+ "http://www.google.com.gt/search*",
+ "http://www.google.com.gt/webhp*",
+
+ "http://www.google.com.hk/",
+ "http://www.google.com.hk/search*",
+ "http://www.google.com.hk/webhp*",
+
+ "http://www.google.com.jm/",
+ "http://www.google.com.jm/search*",
+ "http://www.google.com.jm/webhp*",
+
+ "http://www.google.com.kh/",
+ "http://www.google.com.kh/search*",
+ "http://www.google.com.kh/webhp*",
+
+ "http://www.google.com.kw/",
+ "http://www.google.com.kw/search*",
+ "http://www.google.com.kw/webhp*",
+
+ "http://www.google.com.lb/",
+ "http://www.google.com.lb/search*",
+ "http://www.google.com.lb/webhp*",
+
+ "http://www.google.com.ly/",
+ "http://www.google.com.ly/search*",
+ "http://www.google.com.ly/webhp*",
+
+ "http://www.google.com.mt/",
+ "http://www.google.com.mt/search*",
+ "http://www.google.com.mt/webhp*",
+
+ "http://www.google.com.mx/",
+ "http://www.google.com.mx/search*",
+ "http://www.google.com.mx/webhp*",
+
+ "http://www.google.com.my/",
+ "http://www.google.com.my/search*",
+ "http://www.google.com.my/webhp*",
+
+ "http://www.google.com.na/",
+ "http://www.google.com.na/search*",
+ "http://www.google.com.na/webhp*",
+
+ "http://www.google.com.nf/",
+ "http://www.google.com.nf/search*",
+ "http://www.google.com.nf/webhp*",
+
+ "http://www.google.com.ng/",
+ "http://www.google.com.ng/search*",
+ "http://www.google.com.ng/webhp*",
+
+ "http://www.google.com.ni/",
+ "http://www.google.com.ni/search*",
+ "http://www.google.com.ni/webhp*",
+
+ "http://www.google.com.np/",
+ "http://www.google.com.np/search*",
+ "http://www.google.com.np/webhp*",
+
+ "http://www.google.com.om/",
+ "http://www.google.com.om/search*",
+ "http://www.google.com.om/webhp*",
+
+ "http://www.google.com.pa/",
+ "http://www.google.com.pa/search*",
+ "http://www.google.com.pa/webhp*",
+
+ "http://www.google.com.pe/",
+ "http://www.google.com.pe/search*",
+ "http://www.google.com.pe/webhp*",
+
+ "http://www.google.com.ph/",
+ "http://www.google.com.ph/search*",
+ "http://www.google.com.ph/webhp*",
+
+ "http://www.google.com.pk/",
+ "http://www.google.com.pk/search*",
+ "http://www.google.com.pk/webhp*",
+
+ "http://www.google.com.pr/",
+ "http://www.google.com.pr/search*",
+ "http://www.google.com.pr/webhp*",
+
+ "http://www.google.com.py/",
+ "http://www.google.com.py/search*",
+ "http://www.google.com.py/webhp*",
+
+ "http://www.google.com.qa/",
+ "http://www.google.com.qa/search*",
+ "http://www.google.com.qa/webhp*",
+
+ "http://www.google.com.sa/",
+ "http://www.google.com.sa/search*",
+ "http://www.google.com.sa/webhp*",
+
+ "http://www.google.com.sb/",
+ "http://www.google.com.sb/search*",
+ "http://www.google.com.sb/webhp*",
+
+ "http://www.google.com.sg/",
+ "http://www.google.com.sg/search*",
+ "http://www.google.com.sg/webhp*",
+
+ "http://www.google.com.sl/",
+ "http://www.google.com.sl/search*",
+ "http://www.google.com.sl/webhp*",
+
+ "http://www.google.com.sv/",
+ "http://www.google.com.sv/search*",
+ "http://www.google.com.sv/webhp*",
+
+ "http://www.google.com.tj/",
+ "http://www.google.com.tj/search*",
+ "http://www.google.com.tj/webhp*",
+
+ "http://www.google.com.tr/",
+ "http://www.google.com.tr/search*",
+ "http://www.google.com.tr/webhp*",
+
+ "http://www.google.com.tw/",
+ "http://www.google.com.tw/search*",
+ "http://www.google.com.tw/webhp*",
+
+ "http://www.google.com.ua/",
+ "http://www.google.com.ua/search*",
+ "http://www.google.com.ua/webhp*",
+
+ "http://www.google.com.uy/",
+ "http://www.google.com.uy/search*",
+ "http://www.google.com.uy/webhp*",
+
+ "http://www.google.com.vc/",
+ "http://www.google.com.vc/search*",
+ "http://www.google.com.vc/webhp*",
+
+ "http://www.google.com.vn/",
+ "http://www.google.com.vn/search*",
+ "http://www.google.com.vn/webhp*",
+
+ "http://www.google.cz/",
+ "http://www.google.cz/search*",
+ "http://www.google.cz/webhp*",
+
+ "http://www.google.de/",
+ "http://www.google.de/search*",
+ "http://www.google.de/webhp*",
+
+ "http://www.google.dj/",
+ "http://www.google.dj/search*",
+ "http://www.google.dj/webhp*",
+
+ "http://www.google.dk/",
+ "http://www.google.dk/search*",
+ "http://www.google.dk/webhp*",
+
+ "http://www.google.dm/",
+ "http://www.google.dm/search*",
+ "http://www.google.dm/webhp*",
+
+ "http://www.google.dz/",
+ "http://www.google.dz/search*",
+ "http://www.google.dz/webhp*",
+
+ "http://www.google.ee/",
+ "http://www.google.ee/search*",
+ "http://www.google.ee/webhp*",
+
+ "http://www.google.es/",
+ "http://www.google.es/search*",
+ "http://www.google.es/webhp*",
+
+ "http://www.google.fi/",
+ "http://www.google.fi/search*",
+ "http://www.google.fi/webhp*",
+
+ "http://www.google.fm/",
+ "http://www.google.fm/search*",
+ "http://www.google.fm/webhp*",
+
+ "http://www.google.fr/",
+ "http://www.google.fr/search*",
+ "http://www.google.fr/webhp*",
+
+ "http://www.google.ga/",
+ "http://www.google.ga/search*",
+ "http://www.google.ga/webhp*",
+
+ "http://www.google.ge/",
+ "http://www.google.ge/search*",
+ "http://www.google.ge/webhp*",
+
+ "http://www.google.gg/",
+ "http://www.google.gg/search*",
+ "http://www.google.gg/webhp*",
+
+ "http://www.google.gl/",
+ "http://www.google.gl/search*",
+ "http://www.google.gl/webhp*",
+
+ "http://www.google.gm/",
+ "http://www.google.gm/search*",
+ "http://www.google.gm/webhp*",
+
+ "http://www.google.gp/",
+ "http://www.google.gp/search*",
+ "http://www.google.gp/webhp*",
+
+ "http://www.google.gr/",
+ "http://www.google.gr/search*",
+ "http://www.google.gr/webhp*",
+
+ "http://www.google.gy/",
+ "http://www.google.gy/search*",
+ "http://www.google.gy/webhp*",
+
+ "http://www.google.hn/",
+ "http://www.google.hn/search*",
+ "http://www.google.hn/webhp*",
+
+ "http://www.google.hr/",
+ "http://www.google.hr/search*",
+ "http://www.google.hr/webhp*",
+
+ "http://www.google.ht/",
+ "http://www.google.ht/search*",
+ "http://www.google.ht/webhp*",
+
+ "http://www.google.hu/",
+ "http://www.google.hu/search*",
+ "http://www.google.hu/webhp*",
+
+ "http://www.google.ie/",
+ "http://www.google.ie/search*",
+ "http://www.google.ie/webhp*",
+
+ "http://www.google.im/",
+ "http://www.google.im/search*",
+ "http://www.google.im/webhp*",
+
+ "http://www.google.is/",
+ "http://www.google.is/search*",
+ "http://www.google.is/webhp*",
+
+ "http://www.google.it/",
+ "http://www.google.it/search*",
+ "http://www.google.it/webhp*",
+
+ "http://www.google.it.ao/",
+ "http://www.google.it.ao/search*",
+ "http://www.google.it.ao/webhp*",
+
+ "http://www.google.je/",
+ "http://www.google.je/search*",
+ "http://www.google.je/webhp*",
+
+ "http://www.google.jo/",
+ "http://www.google.jo/search*",
+ "http://www.google.jo/webhp*",
+
+ "http://www.google.kg/",
+ "http://www.google.kg/search*",
+ "http://www.google.kg/webhp*",
+
+ "http://www.google.ki/",
+ "http://www.google.ki/search*",
+ "http://www.google.ki/webhp*",
+
+ "http://www.google.kz/",
+ "http://www.google.kz/search*",
+ "http://www.google.kz/webhp*",
+
+ "http://www.google.la/",
+ "http://www.google.la/search*",
+ "http://www.google.la/webhp*",
+
+ "http://www.google.li/",
+ "http://www.google.li/search*",
+ "http://www.google.li/webhp*",
+
+ "http://www.google.lk/",
+ "http://www.google.lk/search*",
+ "http://www.google.lk/webhp*",
+
+ "http://www.google.lt/",
+ "http://www.google.lt/search*",
+ "http://www.google.lt/webhp*",
+
+ "http://www.google.lu/",
+ "http://www.google.lu/search*",
+ "http://www.google.lu/webhp*",
+
+ "http://www.google.lv/",
+ "http://www.google.lv/search*",
+ "http://www.google.lv/webhp*",
+
+ "http://www.google.md/",
+ "http://www.google.md/search*",
+ "http://www.google.md/webhp*",
+
+ "http://www.google.me/",
+ "http://www.google.me/search*",
+ "http://www.google.me/webhp*",
+
+ "http://www.google.mg/",
+ "http://www.google.mg/search*",
+ "http://www.google.mg/webhp*",
+
+ "http://www.google.mk/",
+ "http://www.google.mk/search*",
+ "http://www.google.mk/webhp*",
+
+ "http://www.google.ml/",
+ "http://www.google.ml/search*",
+ "http://www.google.ml/webhp*",
+
+ "http://www.google.mn/",
+ "http://www.google.mn/search*",
+ "http://www.google.mn/webhp*",
+
+ "http://www.google.ms/",
+ "http://www.google.ms/search*",
+ "http://www.google.ms/webhp*",
+
+ "http://www.google.mu/",
+ "http://www.google.mu/search*",
+ "http://www.google.mu/webhp*",
+
+ "http://www.google.mv/",
+ "http://www.google.mv/search*",
+ "http://www.google.mv/webhp*",
+
+ "http://www.google.mw/",
+ "http://www.google.mw/search*",
+ "http://www.google.mw/webhp*",
+
+ "http://www.google.ne/",
+ "http://www.google.ne/search*",
+ "http://www.google.ne/webhp*",
+
+ "http://www.google.nl/",
+ "http://www.google.nl/search*",
+ "http://www.google.nl/webhp*",
+
+ "http://www.google.no/",
+ "http://www.google.no/search*",
+ "http://www.google.no/webhp*",
+
+ "http://www.google.nr/",
+ "http://www.google.nr/search*",
+ "http://www.google.nr/webhp*",
+
+ "http://www.google.nu/",
+ "http://www.google.nu/search*",
+ "http://www.google.nu/webhp*",
+
+ "http://www.google.pl/",
+ "http://www.google.pl/search*",
+ "http://www.google.pl/webhp*",
+
+ "http://www.google.pn/",
+ "http://www.google.pn/search*",
+ "http://www.google.pn/webhp*",
+
+ "http://www.google.ps/",
+ "http://www.google.ps/search*",
+ "http://www.google.ps/webhp*",
+
+ "http://www.google.pt/",
+ "http://www.google.pt/search*",
+ "http://www.google.pt/webhp*",
+
+ "http://www.google.ro/",
+ "http://www.google.ro/search*",
+ "http://www.google.ro/webhp*",
+
+ "http://www.google.rs/",
+ "http://www.google.rs/search*",
+ "http://www.google.rs/webhp*",
+
+ "http://www.google.ru/",
+ "http://www.google.ru/search*",
+ "http://www.google.ru/webhp*",
+
+ "http://www.google.rw/",
+ "http://www.google.rw/search*",
+ "http://www.google.rw/webhp*",
+
+ "http://www.google.sc/",
+ "http://www.google.sc/search*",
+ "http://www.google.sc/webhp*",
+
+ "http://www.google.se/",
+ "http://www.google.se/search*",
+ "http://www.google.se/webhp*",
+
+ "http://www.google.sh/",
+ "http://www.google.sh/search*",
+ "http://www.google.sh/webhp*",
+
+ "http://www.google.si/",
+ "http://www.google.si/search*",
+ "http://www.google.si/webhp*",
+
+ "http://www.google.sk/",
+ "http://www.google.sk/search*",
+ "http://www.google.sk/webhp*",
+
+ "http://www.google.sm/",
+ "http://www.google.sm/search*",
+ "http://www.google.sm/webhp*",
+
+ "http://www.google.sn/",
+ "http://www.google.sn/search*",
+ "http://www.google.sn/webhp*",
+
+ "http://www.google.st/",
+ "http://www.google.st/search*",
+ "http://www.google.st/webhp*",
+
+ "http://www.google.td/",
+ "http://www.google.td/search*",
+ "http://www.google.td/webhp*",
+
+ "http://www.google.tg/",
+ "http://www.google.tg/search*",
+ "http://www.google.tg/webhp*",
+
+ "http://www.google.tk/",
+ "http://www.google.tk/search*",
+ "http://www.google.tk/webhp*",
+
+ "http://www.google.tl/",
+ "http://www.google.tl/search*",
+ "http://www.google.tl/webhp*",
+
+ "http://www.google.tm/",
+ "http://www.google.tm/search*",
+ "http://www.google.tm/webhp*",
+
+ "http://www.google.to/",
+ "http://www.google.to/search*",
+ "http://www.google.to/webhp*",
+
+ "http://www.google.tt/",
+ "http://www.google.tt/search*",
+ "http://www.google.tt/webhp*",
+
+ "http://www.google.vg/",
+ "http://www.google.vg/search*",
+ "http://www.google.vg/webhp*",
+
+ "http://www.google.vu/",
+ "http://www.google.vu/search*",
+ "http://www.google.vu/webhp*",
+
+ "http://www.google.ws/",
+ "http://www.google.ws/search*",
+ "http://www.google.ws/webhp*",
+
+ "https://encrypted.google.com/",
+ "https://encrypted.google.com/search*",
+ "https://encrypted.google.com/webhp*",
+
+ "https://www.google.com/",
+ "https://www.google.com/search*",
+ "https://www.google.com/webhp*"
+ ],
+ "js": ["common.js", "content_script.js"]
+ }
+ ]
+}