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

Side by Side Diff: extensions/common/extension_urls.cc

Issue 1010953002: [Extensions] Add support for reporting abuse on extension uninstallation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/common/extension_urls.h" 5 #include "extensions/common/extension_urls.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
10 #include "extensions/common/extensions_client.h" 10 #include "extensions/common/extensions_client.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 net::EscapeQueryParamValue(query, false)); 65 net::EscapeQueryParamValue(query, false));
66 } 66 }
67 67
68 GURL GetWebstoreUpdateUrl() { 68 GURL GetWebstoreUpdateUrl() {
69 extensions::ExtensionsClient* client = extensions::ExtensionsClient::Get(); 69 extensions::ExtensionsClient* client = extensions::ExtensionsClient::Get();
70 if (client) 70 if (client)
71 return GURL(client->GetWebstoreUpdateURL()); 71 return GURL(client->GetWebstoreUpdateURL());
72 return GURL(kChromeWebstoreUpdateURL); 72 return GURL(kChromeWebstoreUpdateURL);
73 } 73 }
74 74
75 GURL GetWebstoreReportAbuseUrl(const std::string& extension_id) {
76 return GURL(GetWebstoreLaunchURL() + "/report/" + extension_id);
77 }
78
75 bool IsWebstoreUpdateUrl(const GURL& update_url) { 79 bool IsWebstoreUpdateUrl(const GURL& update_url) {
76 GURL store_url = GetWebstoreUpdateUrl(); 80 GURL store_url = GetWebstoreUpdateUrl();
77 if (update_url == store_url) { 81 if (update_url == store_url) {
78 return true; 82 return true;
79 } else { 83 } else {
80 return (update_url.host() == store_url.host() && 84 return (update_url.host() == store_url.host() &&
81 update_url.path() == store_url.path()); 85 update_url.path() == store_url.path());
82 } 86 }
83 } 87 }
84 88
85 bool IsBlacklistUpdateUrl(const GURL& url) { 89 bool IsBlacklistUpdateUrl(const GURL& url) {
86 extensions::ExtensionsClient* client = extensions::ExtensionsClient::Get(); 90 extensions::ExtensionsClient* client = extensions::ExtensionsClient::Get();
87 if (client) 91 if (client)
88 return client->IsBlacklistUpdateURL(url); 92 return client->IsBlacklistUpdateURL(url);
89 return false; 93 return false;
90 } 94 }
91 95
92 } // namespace extension_urls 96 } // namespace extension_urls
OLDNEW
« chrome/browser/extensions/extension_uninstall_dialog.cc ('K') | « extensions/common/extension_urls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698