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

Unified Diff: chrome/browser/search/contextual_search_promo_source_android.cc

Issue 450543002: Make ContextualSearchPromoSource Android-only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/search/contextual_search_promo_source_android.h ('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/search/contextual_search_promo_source_android.cc
diff --git a/chrome/browser/search/contextual_search_promo_source.cc b/chrome/browser/search/contextual_search_promo_source_android.cc
similarity index 81%
rename from chrome/browser/search/contextual_search_promo_source.cc
rename to chrome/browser/search/contextual_search_promo_source_android.cc
index 7c50b004fecf4a4487408b4b39b8850875bbf24f..41c40af8c2ca2357daffea9481d29e00cb89f188 100644
--- a/chrome/browser/search/contextual_search_promo_source.cc
+++ b/chrome/browser/search/contextual_search_promo_source_android.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/search/contextual_search_promo_source.h"
+#include "chrome/browser/search/contextual_search_promo_source_android.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/string_util.h"
@@ -26,11 +26,11 @@ const char kPromoRobotoPath[] = "/roboto.woff";
} // namespace
-ContextualSearchPromoSource::ContextualSearchPromoSource() {}
+ContextualSearchPromoSourceAndroid::ContextualSearchPromoSourceAndroid() {}
-ContextualSearchPromoSource::~ContextualSearchPromoSource() {}
+ContextualSearchPromoSourceAndroid::~ContextualSearchPromoSourceAndroid() {}
-void ContextualSearchPromoSource::StartDataRequest(
+void ContextualSearchPromoSourceAndroid::StartDataRequest(
const std::string& path_and_query, int render_process_id,
int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) {
@@ -50,11 +50,11 @@ void ContextualSearchPromoSource::StartDataRequest(
}
}
-std::string ContextualSearchPromoSource::GetSource() const {
+std::string ContextualSearchPromoSourceAndroid::GetSource() const {
return chrome::kChromeUIContextualSearchPromoHost;
}
-std::string ContextualSearchPromoSource::GetMimeType(
+std::string ContextualSearchPromoSourceAndroid::GetMimeType(
const std::string& path_and_query) const {
std::string path(GURL("chrome://host/" + path_and_query).path());
if (EndsWith(path, ".js", false)) return "application/javascript";
@@ -65,22 +65,23 @@ std::string ContextualSearchPromoSource::GetMimeType(
return "";
}
-bool ContextualSearchPromoSource::ShouldDenyXFrameOptions() const {
+bool ContextualSearchPromoSourceAndroid::ShouldDenyXFrameOptions() const {
return false;
}
-bool ContextualSearchPromoSource::ShouldAddContentSecurityPolicy() const {
+bool
+ContextualSearchPromoSourceAndroid::ShouldAddContentSecurityPolicy() const {
return false;
}
-void ContextualSearchPromoSource::SendResource(
+void ContextualSearchPromoSourceAndroid::SendResource(
int resource_id, const content::URLDataSource::GotDataCallback& callback) {
scoped_refptr<base::RefCountedStaticMemory> response(
ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id));
callback.Run(response.get());
}
-void ContextualSearchPromoSource::SendHtmlWithStrings(
+void ContextualSearchPromoSourceAndroid::SendHtmlWithStrings(
const content::URLDataSource::GotDataCallback& callback) {
base::DictionaryValue strings_data;
strings_data.SetString(
« no previous file with comments | « chrome/browser/search/contextual_search_promo_source_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698