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..1d2b6526c4c5e5bf0bbd3581cecd2a45d405415d 100644 |
--- a/chrome/browser/search/local_ntp_source.h |
+++ b/chrome/browser/search/local_ntp_source.h |
@@ -5,8 +5,11 @@ |
#ifndef CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ |
#define CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ |
+#include <memory> |
+ |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "content/public/browser/url_data_source.h" |
class Profile; |
@@ -18,6 +21,8 @@ class LocalNtpSource : public content::URLDataSource { |
explicit LocalNtpSource(Profile* profile); |
private: |
+ class GoogleSearchProviderTracker; |
+ |
~LocalNtpSource() override; |
// Overridden from content::URLDataSource: |
@@ -29,10 +34,22 @@ 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; |
+ void DefaultSearchProviderIsGoogleChanged(bool is_google); |
+ |
+ void SetDefaultSearchProviderIsGoogleOnIOThread(bool is_google); |
+ |
Profile* profile_; |
+ std::unique_ptr<GoogleSearchProviderTracker> google_tracker_; |
+ bool default_search_provider_is_google_; |
+ // A copy of |default_search_provider_is_google_| for use on the IO thread. |
+ bool default_search_provider_is_google_io_thread_; |
+ |
+ base::WeakPtrFactory<LocalNtpSource> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(LocalNtpSource); |
}; |