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

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

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: virtual Created 7 years, 8 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/local_ntp_source.h ('k') | chrome/browser/search/suggestion_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/local_ntp_source.cc
diff --git a/chrome/browser/search/local_ntp_source.cc b/chrome/browser/search/local_ntp_source.cc
index a636df109f371a2d1a448db22a54d6a82dadcf94..42a91740bccf0b0d14aa307f91593595a10f4af6 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "grit/browser_resources.h"
@@ -103,3 +104,10 @@ bool LocalNtpSource::ShouldServiceRequest(
}
return false;
}
+
+std::string LocalNtpSource::GetContentSecurityPolicyFrameSrc() const {
+ // Allow embedding of chrome search suggestion host.
+ return base::StringPrintf("frame-src %s://%s/;",
+ chrome::kChromeSearchScheme,
+ chrome::kChromeSearchSuggestionHost);
+}
« no previous file with comments | « chrome/browser/search/local_ntp_source.h ('k') | chrome/browser/search/suggestion_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698