From 5bd3df3298b7bde0f7d6a93150f2f1df535d4aa6 Mon Sep 17 00:00:00 2001 From: Simon Hong Date: Wed, 9 Sep 2020 15:19:14 +0900 Subject: [PATCH] Delete SR component data caching logic As we decided not show SR top sites in NTP after SR is terminated, we don't need to cache it. Delete getDefaultSuperReferralTopSites api and related code --- browser/brave_browser_process_impl.cc | 8 +- .../ui/webui/brave_new_tab_message_handler.cc | 15 ---- .../ui/webui/brave_new_tab_message_handler.h | 1 - .../brave_new_tab_ui/api/brandedWallpaper.ts | 4 - .../brave_new_tab_ui/api/initialData.ts | 4 - .../storage/grid_sites_storage.ts | 8 -- .../browser/ntp_background_images_data.cc | 19 ---- .../browser/ntp_background_images_data.h | 4 - .../browser/ntp_background_images_service.cc | 87 +++---------------- .../browser/ntp_background_images_service.h | 9 +- .../ntp_background_images_service_unittest.cc | 3 +- .../browser/ntp_background_images_source.cc | 2 +- .../ntp_background_images_source_unittest.cc | 3 +- .../browser/view_counter_service.cc | 11 --- .../browser/view_counter_service.h | 1 - .../browser/view_counter_service_unittest.cc | 6 +- .../common/pref_names.cc | 2 - .../ntp_background_images/common/pref_names.h | 1 - 18 files changed, 23 insertions(+), 165 deletions(-) diff --git a/browser/brave_browser_process_impl.cc b/browser/brave_browser_process_impl.cc index 4c2fd5e8010..e8144f0e805 100644 --- a/browser/brave_browser_process_impl.cc +++ b/browser/brave_browser_process_impl.cc @@ -239,13 +239,9 @@ BraveBrowserProcessImpl::ntp_background_images_service() { return nullptr; if (!ntp_background_images_service_) { - base::FilePath user_data_dir; - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); ntp_background_images_service_ = - std::make_unique( - component_updater(), - local_state(), - user_data_dir); + std::make_unique(component_updater(), + local_state()); ntp_background_images_service_->Init(); } diff --git a/browser/ui/webui/brave_new_tab_message_handler.cc b/browser/ui/webui/brave_new_tab_message_handler.cc index b05e49d3cde..354777eff4c 100644 --- a/browser/ui/webui/brave_new_tab_message_handler.cc +++ b/browser/ui/webui/brave_new_tab_message_handler.cc @@ -224,11 +224,6 @@ void BraveNewTabMessageHandler::RegisterMessages() { base::BindRepeating( &BraveNewTabMessageHandler::HandleGetBrandedWallpaperData, base::Unretained(this))); - web_ui()->RegisterMessageCallback( - "getDefaultSuperReferralTopSitesData", - base::BindRepeating( - &BraveNewTabMessageHandler::HandleGetDefaultSuperReferralTopSitesData, - base::Unretained(this))); } void BraveNewTabMessageHandler::OnJavascriptAllowed() { @@ -436,16 +431,6 @@ void BraveNewTabMessageHandler::HandleGetBrandedWallpaperData( service ? service->GetCurrentWallpaperForDisplay() : base::Value()); } -void BraveNewTabMessageHandler::HandleGetDefaultSuperReferralTopSitesData( - const base::ListValue* args) { - AllowJavascript(); - - auto* service = ViewCounterServiceFactory::GetForProfile(profile_); - ResolveJavascriptCallback( - args->GetList()[0], - service ? service->GetTopSites(true) : base::Value()); -} - void BraveNewTabMessageHandler::OnPrivatePropertiesChanged() { PrefService* prefs = profile_->GetPrefs(); auto data = GetPrivatePropertiesDictionary(prefs); diff --git a/browser/ui/webui/brave_new_tab_message_handler.h b/browser/ui/webui/brave_new_tab_message_handler.h index 566ab159d39..75d8dc818a2 100644 --- a/browser/ui/webui/brave_new_tab_message_handler.h +++ b/browser/ui/webui/brave_new_tab_message_handler.h @@ -45,7 +45,6 @@ class BraveNewTabMessageHandler : public content::WebUIMessageHandler, const base::ListValue* args); void HandleRegisterNewTabPageView(const base::ListValue* args); void HandleGetBrandedWallpaperData(const base::ListValue* args); - void HandleGetDefaultSuperReferralTopSitesData(const base::ListValue* args); void OnStatsChanged(); void OnPreferencesChanged(); diff --git a/components/brave_new_tab_ui/api/brandedWallpaper.ts b/components/brave_new_tab_ui/api/brandedWallpaper.ts index 7c8f02a9549..52f194e1d15 100644 --- a/components/brave_new_tab_ui/api/brandedWallpaper.ts +++ b/components/brave_new_tab_ui/api/brandedWallpaper.ts @@ -7,10 +7,6 @@ export function getBrandedWallpaper (): Promise('getBrandedWallpaperData') } -export function getDefaultSuperReferralTopSites (): Promise { - return window.cr.sendWithPromise('getDefaultSuperReferralTopSitesData') -} - export function registerViewCount (): Promise { return window.cr.sendWithPromise('registerNewTabPageView') } diff --git a/components/brave_new_tab_ui/api/initialData.ts b/components/brave_new_tab_ui/api/initialData.ts index e561bb65eea..ec60453c12b 100644 --- a/components/brave_new_tab_ui/api/initialData.ts +++ b/components/brave_new_tab_ui/api/initialData.ts @@ -16,7 +16,6 @@ export type InitialData = { privateTabData: privateTabDataAPI.PrivateTabData torTabData: torTabDataAPI.TorTabData topSites: chrome.topSites.MostVisitedURL[] - defaultSuperReferralTopSites: undefined | NewTab.DefaultSuperReferralTopSite[] brandedWallpaperData: undefined | NewTab.BrandedWallpaper togetherSupported: boolean geminiSupported: boolean @@ -48,7 +47,6 @@ export async function getInitialData (): Promise { privateTabData, torTabData, topSites, - defaultSuperReferralTopSites, brandedWallpaperData, togetherSupported, geminiSupported, @@ -59,7 +57,6 @@ export async function getInitialData (): Promise { privateTabDataAPI.getPrivateTabData(), torTabDataAPI.getTorTabData(), topSitesAPI.getTopSiteTiles(), - !isIncognito ? brandedWallpaper.getDefaultSuperReferralTopSites() : Promise.resolve(undefined), !isIncognito ? brandedWallpaper.getBrandedWallpaper() : Promise.resolve(undefined), new Promise((resolve) => { if (!('braveTogether' in chrome)) { @@ -88,7 +85,6 @@ export async function getInitialData (): Promise { privateTabData, torTabData, topSites, - defaultSuperReferralTopSites, brandedWallpaperData, togetherSupported, geminiSupported, diff --git a/components/brave_new_tab_ui/storage/grid_sites_storage.ts b/components/brave_new_tab_ui/storage/grid_sites_storage.ts index 8d5588dd0de..9bafdf00d23 100644 --- a/components/brave_new_tab_ui/storage/grid_sites_storage.ts +++ b/components/brave_new_tab_ui/storage/grid_sites_storage.ts @@ -6,7 +6,6 @@ // Utils import { debounce } from '../../common/debounce' const keyName = 'grid-sites-data-v1' -const defaultSuperReferralTopSitesKeyName = 'default-super-referral-top-sites' export const initialGridSitesState: NewTab.GridSitesState = { gridSites: [], @@ -40,10 +39,3 @@ export const debouncedSave = debounce((data: NewTab.GridS } }, 50) -export const isDefaultSuperReferralTopSitesAddedToPinnedSites = (): boolean => { - return window.localStorage.getItem(defaultSuperReferralTopSitesKeyName) !== null -} - -export const setDefaultSuperReferralTopSitesAddedToPinnedSites = () => { - window.localStorage.setItem(defaultSuperReferralTopSitesKeyName, 'set') -} diff --git a/components/ntp_background_images/browser/ntp_background_images_data.cc b/components/ntp_background_images/browser/ntp_background_images_data.cc index 2298a30c855..e6c44a6dc47 100644 --- a/components/ntp_background_images/browser/ntp_background_images_data.cc +++ b/components/ntp_background_images/browser/ntp_background_images_data.cc @@ -193,25 +193,6 @@ std::vector NTPBackgroundImagesData::GetTopSitesForWebUI() const { return top_sites_for_webui; } -base::Value NTPBackgroundImagesData::GetTopSites(bool for_webui) const { - base::Value top_sites_list_value(base::Value::Type::LIST); - int index = 0; - for (const auto& top_site : top_sites) { - base::Value top_site_value(base::Value::Type::DICTIONARY); - top_site_value.SetStringKey(for_webui ? "title" : "name", top_site.name); - top_site_value.SetStringKey(for_webui ? "url" : "destinationUrl", - top_site.destination_url); - top_site_value.SetStringKey(for_webui? "favicon" : "iconUrl", - GetURLPrefix() + top_site.image_path); - if (for_webui) - top_site_value.SetIntKey("pinnedIndex", index++); - if (!for_webui) - top_site_value.SetStringKey("backgroundColor", top_site.background_color); - top_sites_list_value.Append(std::move(top_site_value)); - } - return top_sites_list_value; -} - std::string NTPBackgroundImagesData::logo_image_url() const { return GetURLPrefix() + kLogoPath; } diff --git a/components/ntp_background_images/browser/ntp_background_images_data.h b/components/ntp_background_images/browser/ntp_background_images_data.h index 9aa6e765120..a95c7e68e28 100644 --- a/components/ntp_background_images/browser/ntp_background_images_data.h +++ b/components/ntp_background_images/browser/ntp_background_images_data.h @@ -50,10 +50,6 @@ struct NTPBackgroundImagesData { bool IsValid() const; // Generate Value with background image at |index|. base::Value GetBackgroundAt(size_t index); - // Returns empty list value if this data is for sponsored images wallpaper. - // Use different key string for webui. NTP WebUI uses different key name for - // top sites values. - base::Value GetTopSites(bool for_webui = false) const; std::vector GetTopSitesForWebUI() const; bool IsSuperReferral() const; diff --git a/components/ntp_background_images/browser/ntp_background_images_service.cc b/components/ntp_background_images/browser/ntp_background_images_service.cc index 698add6f8f1..ace91cfdd4f 100644 --- a/components/ntp_background_images/browser/ntp_background_images_service.cc +++ b/components/ntp_background_images/browser/ntp_background_images_service.cc @@ -56,37 +56,12 @@ std::string GetMappingTableData(const base::FilePath& installed_dir) { return contents; } -void CacheSuperReferralData(const std::string& data_json, - const base::FilePath& installed_dir, - const base::FilePath& super_referral_cache_dir) { - NTPBackgroundImagesData data(data_json, - super_referral_cache_dir); - - base::CreateDirectory(super_referral_cache_dir); - // Cache logo image - base::CopyFile(installed_dir.Append(data.logo_image_file.BaseName()), - data.logo_image_file); - // Cache topsite favicon images - for (const auto& top_site : data.top_sites) { - base::CopyFile(installed_dir.Append(top_site.image_file.BaseName()), - top_site.image_file); - } - // Cache background images - for (const auto& background : data.backgrounds) { - base::CopyFile(installed_dir.Append(background.image_file.BaseName()), - background.image_file); - } -} - // If registered component is for sponsored images wallpaper, it has photo.json // in |installed_dir|. Otherwise, it has data.json for super referral. // This methods cache super referral's favicon data because that favicon images // could be used after campaign ends. // And return manifest json string. -std::string HandleComponentData( - const base::FilePath& installed_dir, - const base::FilePath& super_referral_cache_dir, - bool is_super_referral) { +std::string HandleComponentData(const base::FilePath& installed_dir) { base::FilePath json_path = installed_dir.AppendASCII(kNTPManifestFile); std::string contents; @@ -102,9 +77,6 @@ std::string HandleComponentData( return contents; } - if (is_super_referral) - CacheSuperReferralData(contents, installed_dir, super_referral_cache_dir); - return contents; } @@ -119,28 +91,21 @@ void NTPBackgroundImagesService::RegisterLocalStatePrefs( prefs::kNewTabPageCachedSuperReferralComponentData, std::string()); registry->RegisterStringPref( prefs::kNewTabPageCachedSuperReferralCode, std::string()); - registry->RegisterListPref( - prefs::kNewTabPageCachedSuperReferralFaviconList); registry->RegisterBooleanPref( prefs::kNewTabPageGetInitialSRComponentInProgress, false); } NTPBackgroundImagesService::NTPBackgroundImagesService( component_updater::ComponentUpdateService* cus, - PrefService* local_pref, - const base::FilePath& user_data_dir) + PrefService* local_pref) : component_update_service_(cus), local_pref_(local_pref), - super_referral_cache_dir_( - user_data_dir.AppendASCII("SuperReferralCache")), weak_factory_(this) { } NTPBackgroundImagesService::~NTPBackgroundImagesService() = default; void NTPBackgroundImagesService::Init() { - RestoreCachedTopSitesFaviconList(); - // Flag override for testing or demo purposes base::FilePath forced_local_path( base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( @@ -221,8 +186,7 @@ void NTPBackgroundImagesService::CheckSuperReferralComponent() { if (!cached_data.empty()) { DVLOG(2) << __func__ << ": Initialized SR Data from cache."; sr_images_data_.reset( - new NTPBackgroundImagesData(cached_data, - super_referral_cache_dir_)); + new NTPBackgroundImagesData(cached_data, si_installed_dir_)); } return; } @@ -470,8 +434,7 @@ void NTPBackgroundImagesService::OnComponentReady( base::PostTaskAndReplyWithResult( FROM_HERE, {base::ThreadPool(), base::MayBlock()}, - base::BindOnce(&HandleComponentData, installed_dir, - super_referral_cache_dir_, is_super_referral), + base::BindOnce(&HandleComponentData, installed_dir), base::BindOnce(&NTPBackgroundImagesService::OnGetComponentJsonData, weak_factory_.GetWeakPtr(), is_super_referral)); @@ -485,22 +448,14 @@ void NTPBackgroundImagesService::OnGetComponentJsonData( prefs::kNewTabPageGetInitialSRComponentInProgress, false); sr_images_data_.reset( - new NTPBackgroundImagesData(json_string, - super_referral_cache_dir_)); + new NTPBackgroundImagesData(json_string, sr_installed_dir_)); // |initial_sr_component_info_| has proper data only for initial component // downloading. After that, it's empty. In test, it's also empty. if (initial_sr_component_info_.is_dict()) { local_pref_->Set(prefs::kNewTabPageCachedSuperReferralComponentInfo, initial_sr_component_info_); } - if (local_pref_->FindPreference( - prefs::kNewTabPageCachedSuperReferralFaviconList)-> - IsDefaultValue() && - sr_images_data_->IsValid()) { - // This is done only once because super referral will have same top sites - // list forever. - CacheTopSitesFaviconList(); - } + CacheTopSitesFaviconList(); local_pref_->SetString(prefs::kNewTabPageCachedSuperReferralComponentData, json_string); } else { @@ -534,33 +489,17 @@ void NTPBackgroundImagesService::MarkThisInstallIsNotSuperReferralForever() { } void NTPBackgroundImagesService::CacheTopSitesFaviconList() { - DCHECK(sr_images_data_->IsValid()); - DCHECK(local_pref_->FindPreference( - prefs::kNewTabPageCachedSuperReferralFaviconList)-> - IsDefaultValue()); + if (!sr_images_data_->IsValid()) + return; + base::Value list(base::Value::Type::LIST); for (const auto& top_site : sr_images_data_->top_sites) { - const std::string file_path = super_referral_cache_dir_.Append( + const std::string file_path = sr_installed_dir_.Append( top_site.image_file.BaseName()).AsUTF8Unsafe(); list.Append(file_path); - cached_top_site_favicon_list_.push_back(file_path); + top_site_favicon_list_.push_back(file_path); } - - local_pref_->Set(prefs::kNewTabPageCachedSuperReferralFaviconList, list); -} - -void NTPBackgroundImagesService::RestoreCachedTopSitesFaviconList() { - if (local_pref_->FindPreference( - prefs::kNewTabPageCachedSuperReferralFaviconList)-> - IsDefaultValue()) { - return; - } - - const auto* value = local_pref_->Get( - prefs::kNewTabPageCachedSuperReferralFaviconList); - for (const auto& file : value->GetList()) - cached_top_site_favicon_list_.push_back(file.GetString()); } bool NTPBackgroundImagesService::IsValidSuperReferralComponentInfo( @@ -579,8 +518,8 @@ bool NTPBackgroundImagesService::IsValidSuperReferralComponentInfo( } std::vector -NTPBackgroundImagesService::GetCachedTopSitesFaviconList() const { - return cached_top_site_favicon_list_; +NTPBackgroundImagesService::GetTopSitesFaviconList() const { + return top_site_favicon_list_; } void NTPBackgroundImagesService::UnRegisterSuperReferralComponent() { diff --git a/components/ntp_background_images/browser/ntp_background_images_service.h b/components/ntp_background_images/browser/ntp_background_images_service.h index 678701c3571..fe3a65ea885 100644 --- a/components/ntp_background_images/browser/ntp_background_images_service.h +++ b/components/ntp_background_images/browser/ntp_background_images_service.h @@ -45,8 +45,7 @@ class NTPBackgroundImagesService { NTPBackgroundImagesService( component_updater::ComponentUpdateService* cus, - PrefService* local_pref, - const base::FilePath& user_data_dir); + PrefService* local_pref); virtual ~NTPBackgroundImagesService(); NTPBackgroundImagesService(const NTPBackgroundImagesService&) = delete; @@ -67,7 +66,7 @@ class NTPBackgroundImagesService { std::string GetSuperReferralThemeName() const; std::string GetSuperReferralCode() const; - std::vector GetCachedTopSitesFaviconList() const; + std::vector GetTopSitesFaviconList() const; private: friend class TestNTPBackgroundImagesService; @@ -121,7 +120,6 @@ class NTPBackgroundImagesService { const base::Value& component_info) const; void CacheTopSitesFaviconList(); - void RestoreCachedTopSitesFaviconList(); void CheckSIComponentUpdate(const std::string& component_id); // virtual for test. @@ -134,11 +132,10 @@ class NTPBackgroundImagesService { virtual void MarkThisInstallIsNotSuperReferralForever(); base::RepeatingTimer si_update_check_timer_; - std::vector cached_top_site_favicon_list_; + std::vector top_site_favicon_list_; bool test_data_used_ = false; component_updater::ComponentUpdateService* component_update_service_; PrefService* local_pref_; - const base::FilePath super_referral_cache_dir_; base::FilePath si_installed_dir_; base::FilePath sr_installed_dir_; base::ObserverList::Unchecked observer_list_; diff --git a/components/ntp_background_images/browser/ntp_background_images_service_unittest.cc b/components/ntp_background_images/browser/ntp_background_images_service_unittest.cc index d28727b524b..bcc1769bfae 100644 --- a/components/ntp_background_images/browser/ntp_background_images_service_unittest.cc +++ b/components/ntp_background_images/browser/ntp_background_images_service_unittest.cc @@ -125,8 +125,7 @@ class NTPBackgroundImagesServiceTest : public testing::Test { } void Init() { - service_.reset(new TestNTPBackgroundImagesService( - nullptr, &pref_service_, base::FilePath())); + service_.reset(new TestNTPBackgroundImagesService(nullptr, &pref_service_)); service_->Init(); } diff --git a/components/ntp_background_images/browser/ntp_background_images_source.cc b/components/ntp_background_images/browser/ntp_background_images_source.cc index 00a8943b072..c9dc85e46cf 100644 --- a/components/ntp_background_images/browser/ntp_background_images_source.cc +++ b/components/ntp_background_images/browser/ntp_background_images_source.cc @@ -178,7 +178,7 @@ bool NTPBackgroundImagesSource::IsTopSiteFaviconPath( base::FilePath NTPBackgroundImagesSource::GetTopSiteFaviconFilePath( const std::string& path) const { - std::vector list = service_->GetCachedTopSitesFaviconList(); + std::vector list = service_->GetTopSitesFaviconList(); for (const auto& favicon_file : list) { base::FilePath file_path = base::FilePath::FromUTF8Unsafe(favicon_file); if (path.compare(kSuperReferralPath + file_path.BaseName().AsUTF8Unsafe()) diff --git a/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc b/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc index fbd082a9fe6..55ee5b01a69 100644 --- a/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc +++ b/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc @@ -26,8 +26,7 @@ class NTPBackgroundImagesSourceTest : public testing::Test { auto* registry = local_pref_.registry(); NTPBackgroundImagesService::RegisterLocalStatePrefs(registry); brave::RegisterPrefsForBraveReferralsService(registry); - service_.reset(new NTPBackgroundImagesService( - nullptr, &local_pref_, base::FilePath())); + service_.reset(new NTPBackgroundImagesService(nullptr, &local_pref_)); source_.reset(new NTPBackgroundImagesSource(service_.get())); local_pref_.Set(prefs::kNewTabPageCachedSuperReferralComponentInfo, base::Value(base::Value::Type::DICTIONARY)); diff --git a/components/ntp_background_images/browser/view_counter_service.cc b/components/ntp_background_images/browser/view_counter_service.cc index b3f5e457185..6e9bc9786fc 100644 --- a/components/ntp_background_images/browser/view_counter_service.cc +++ b/components/ntp_background_images/browser/view_counter_service.cc @@ -104,17 +104,6 @@ std::vector ViewCounterService::GetTopSitesVectorForWebUI() const { return {}; } -base::Value ViewCounterService::GetTopSites(bool for_webui) const { -#if BUILDFLAG(ENABLE_BRAVE_REFERRALS) - if (auto* data = GetCurrentBrandedWallpaperData()) { - if (data->IsSuperReferral()) - return GetCurrentBrandedWallpaperData()->GetTopSites(for_webui); - } -#endif - - return base::Value(); -} - std::vector ViewCounterService::GetTopSitesVectorData() const { #if BUILDFLAG(ENABLE_BRAVE_REFERRALS) if (auto* data = GetCurrentBrandedWallpaperData()) diff --git a/components/ntp_background_images/browser/view_counter_service.h b/components/ntp_background_images/browser/view_counter_service.h index 415f5ad5068..babd8a82132 100644 --- a/components/ntp_background_images/browser/view_counter_service.h +++ b/components/ntp_background_images/browser/view_counter_service.h @@ -51,7 +51,6 @@ class ViewCounterService : public KeyedService, base::Value GetCurrentWallpaperForDisplay() const; base::Value GetCurrentWallpaper() const; - base::Value GetTopSites(bool for_webui = false) const; std::vector GetTopSitesVectorForWebUI() const; std::vector GetTopSitesVectorData() const; diff --git a/components/ntp_background_images/browser/view_counter_service_unittest.cc b/components/ntp_background_images/browser/view_counter_service_unittest.cc index 4a61be989b4..41bb4c20e5b 100644 --- a/components/ntp_background_images/browser/view_counter_service_unittest.cc +++ b/components/ntp_background_images/browser/view_counter_service_unittest.cc @@ -63,10 +63,8 @@ class NTPBackgroundImagesViewCounterTest : public testing::Test { brave::RegisterPrefsForBraveReferralsService(local_registry); NTPBackgroundImagesService::RegisterLocalStatePrefs(local_registry); - service_ = std::make_unique( - nullptr, - &local_pref_, - base::FilePath()); + service_ = std::make_unique(nullptr, + &local_pref_); view_counter_ = std::make_unique( service_.get(), prefs(), true); diff --git a/components/ntp_background_images/common/pref_names.cc b/components/ntp_background_images/common/pref_names.cc index ee9e6adba84..9ed2a37ace5 100644 --- a/components/ntp_background_images/common/pref_names.cc +++ b/components/ntp_background_images/common/pref_names.cc @@ -21,8 +21,6 @@ const char kNewTabPageCachedSuperReferralComponentInfo[] = "brave.new_tab_page.cached_super_referral_component_info"; const char kNewTabPageCachedSuperReferralComponentData[] = "brave.new_tab_page.cached_super_referral_component_data"; -const char kNewTabPageCachedSuperReferralFaviconList[] = - "brave.new_tab_page.cached_super_referral_favicon_list"; const char kNewTabPageGetInitialSRComponentInProgress[] = "brave.new_tab_page.get_initial_sr_component_in_progress"; const char kNewTabPageCachedSuperReferralCode[] = diff --git a/components/ntp_background_images/common/pref_names.h b/components/ntp_background_images/common/pref_names.h index f685c9f684a..0af9364ce10 100644 --- a/components/ntp_background_images/common/pref_names.h +++ b/components/ntp_background_images/common/pref_names.h @@ -20,7 +20,6 @@ extern const char kNewTabPageShowBackgroundImage[]; // Local prefs extern const char kNewTabPageCachedSuperReferralComponentInfo[]; extern const char kNewTabPageCachedSuperReferralComponentData[]; -extern const char kNewTabPageCachedSuperReferralFaviconList[]; extern const char kNewTabPageGetInitialSRComponentInProgress[]; extern const char kNewTabPageCachedSuperReferralCode[];