Index: chrome/browser/search/local_ntp_source.h |
diff --git a/chrome/browser/search/local_ntp_source.h b/chrome/browser/search/local_ntp_source.h |
index 24d81dc9c55fbdc15eea2a785108e1968c35c295..482a870101f70fc8c694f3ddae75c426c6eb4e3d 100644 |
--- a/chrome/browser/search/local_ntp_source.h |
+++ b/chrome/browser/search/local_ntp_source.h |
@@ -7,13 +7,17 @@ |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
+#include "base/scoped_observer.h" |
+#include "chrome/browser/search/google_search_provider_service_observer.h" |
#include "content/public/browser/url_data_source.h" |
+class GoogleSearchProviderService; |
class Profile; |
// Serves HTML and resources for the local new tab page i.e. |
// chrome-search://local-ntp/local-ntp.html |
-class LocalNtpSource : public content::URLDataSource { |
+class LocalNtpSource : public content::URLDataSource, |
+ public GoogleSearchProviderServiceObserver { |
public: |
explicit LocalNtpSource(Profile* profile); |
@@ -29,10 +33,19 @@ class LocalNtpSource : public content::URLDataSource { |
std::string GetMimeType(const std::string& path) const override; |
bool AllowCaching() const override; |
bool ShouldServiceRequest(const net::URLRequest* request) const override; |
+ std::string GetContentSecurityPolicyScriptSrc() const override; |
std::string GetContentSecurityPolicyChildSrc() const override; |
+ // Overridden from GoogleSearchProviderServiceObserver: |
+ void OnDefaultSearchProviderIsGoogleChanged(bool is_google) override; |
+ void OnGoogleSearchProviderServiceShuttingDown() override; |
+ |
Profile* profile_; |
+ ScopedObserver<GoogleSearchProviderService, LocalNtpSource> |
+ default_search_provider_observer_; |
+ bool default_search_provider_is_google_; |
+ |
DISALLOW_COPY_AND_ASSIGN(LocalNtpSource); |
}; |