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

Unified Diff: chrome/browser/intents/cws_intents_registry.cc

Issue 10911331: Using API keys for requests to Chrome Web Store. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 | « chrome/browser/intents/api_key.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/intents/cws_intents_registry.cc
diff --git a/chrome/browser/intents/cws_intents_registry.cc b/chrome/browser/intents/cws_intents_registry.cc
index 96fd943aa1d8c9a30c4234283ffee7c4b484aa0e..bbf194262788887f12d0b07c0b49e0c0b3ecd5f9 100644
--- a/chrome/browser/intents/cws_intents_registry.cc
+++ b/chrome/browser/intents/cws_intents_registry.cc
@@ -12,7 +12,6 @@
#include "base/utf_string_conversions.h"
#include "chrome/common/extensions/extension_l10n_util.h"
#include "chrome/common/extensions/message_bundle.h"
-#include "chrome/browser/intents/api_key.h"
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/net/url_util.h"
@@ -20,6 +19,11 @@
#include "net/base/mime_util.h"
#include "net/url_request/url_fetcher.h"
+// Forward declaration.
Jói 2012/09/17 16:56:19 Seems simpler to just #include (and update DEPS if
Greg Billock 2012/09/17 17:52:18 Yes, let's #include
+namespace google_apis {
+std::string GetAPIKey();
+}
+
namespace {
// Limit for the number of suggestions we fix from CWS. Ideally, the registry
@@ -233,10 +237,8 @@ GURL CWSIntentsRegistry::BuildQueryURL(const string16& action,
"0");
request = chrome_common_net::AppendQueryParameter(request, "num_results",
kMaxSuggestions);
- if (web_intents::kApiKey[0]) {
- request = chrome_common_net::AppendQueryParameter(request, "key",
- web_intents::kApiKey);
- }
+ request = chrome_common_net::AppendQueryParameter(request, "key",
+ google_apis::GetAPIKey());
Steve McKay 2012/09/17 17:01:43 Question, for Jói mostly. In the past when we need
return request;
}
« no previous file with comments | « chrome/browser/intents/api_key.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698