diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 22:55:30 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-21 22:55:30 +0000 |
commit | 627e05130fa2d98498dbd19fdcae4a173801d797 (patch) | |
tree | 6ab91bc7d842c689a509e897a09c5a789798ac17 /chrome/browser/ui/webui | |
parent | 632197304ce0bb8fa5cd8931fe90c3c19cdeeab8 (diff) | |
download | chromium_src-627e05130fa2d98498dbd19fdcae4a173801d797.zip chromium_src-627e05130fa2d98498dbd19fdcae4a173801d797.tar.gz chromium_src-627e05130fa2d98498dbd19fdcae4a173801d797.tar.bz2 |
Rename TabContents::browser_context() to GetBrowserContext and put it into the WebContents interface.
BUG=98716
Review URL: http://codereview.chromium.org/9021022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui')
55 files changed, 65 insertions, 64 deletions
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc index fdd8beb..c07f19d 100644 --- a/chrome/browser/ui/webui/about_ui.cc +++ b/chrome/browser/ui/webui/about_ui.cc @@ -1379,7 +1379,7 @@ std::string AboutUIHTMLSource::GetMimeType(const std::string& path) const { AboutUI::AboutUI(TabContents* contents, const std::string& name) : ChromeWebUI(contents) { - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); ChromeURLDataManager::DataSource* source = new AboutUIHTMLSource(name, profile); if (source) diff --git a/chrome/browser/ui/webui/active_downloads_ui.cc b/chrome/browser/ui/webui/active_downloads_ui.cc index f59af2a..460c093 100644 --- a/chrome/browser/ui/webui/active_downloads_ui.cc +++ b/chrome/browser/ui/webui/active_downloads_ui.cc @@ -369,7 +369,7 @@ ActiveDownloadsUI::ActiveDownloadsUI(TabContents* contents) handler_->Init(); // Set up the chrome://active-downloads/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateActiveDownloadsUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/aura/app_list_ui.cc b/chrome/browser/ui/webui/aura/app_list_ui.cc index d63d784..e876431 100644 --- a/chrome/browser/ui/webui/aura/app_list_ui.cc +++ b/chrome/browser/ui/webui/aura/app_list_ui.cc @@ -125,7 +125,7 @@ AppListUI::AppListUI(TabContents* contents) AddMessageHandler((new AppLauncherHandler(service))->Attach(this)); // Set up the source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); PrefService* prefs = profile->GetPrefs(); profile->GetChromeURLDataManager()->AddDataSource( CreateAppListUIHTMLSource(prefs)); diff --git a/chrome/browser/ui/webui/bookmarks_ui.cc b/chrome/browser/ui/webui/bookmarks_ui.cc index 7673997..c4363ae 100644 --- a/chrome/browser/ui/webui/bookmarks_ui.cc +++ b/chrome/browser/ui/webui/bookmarks_ui.cc @@ -59,7 +59,7 @@ BookmarksUI::BookmarksUI(TabContents* contents) : ChromeWebUI(contents) { BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource(); // Set up the chrome://bookmarks/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc index ca36cca..bbb603a 100644 --- a/chrome/browser/ui/webui/bug_report_ui.cc +++ b/chrome/browser/ui/webui/bug_report_ui.cc @@ -332,7 +332,7 @@ void BugReportHandler::ClobberScreenshotsSource() { // Re-create our screenshots data source (this clobbers the last source) // setting the screenshot to NULL, effectively disabling the source // TODO(rkc): Once there is a method to 'remove' a source, change this code - Profile* profile = Profile::FromBrowserContext(tab_->browser_context()); + Profile* profile = Profile::FromBrowserContext(tab_->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(new ScreenshotSource(NULL)); BugReportUtil::ClearScreenshotPng(); @@ -345,7 +345,7 @@ void BugReportHandler::SetupScreenshotsSource() { new ScreenshotSource(BugReportUtil::GetScreenshotPng()); } // Add the source to the data manager. - Profile* profile = Profile::FromBrowserContext(tab_->browser_context()); + Profile* profile = Profile::FromBrowserContext(tab_->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(screenshot_source_); } @@ -624,6 +624,6 @@ BugReportUI::BugReportUI(TabContents* tab) : HtmlDialogUI(tab) { CreateBugReportUIHTMLSource(handler->Init()); // Set up the chrome://bugreport/ source. - Profile* profile = Profile::FromBrowserContext(tab->browser_context()); + Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/certificate_viewer_ui.cc b/chrome/browser/ui/webui/certificate_viewer_ui.cc index e366afe..1c41b09 100644 --- a/chrome/browser/ui/webui/certificate_viewer_ui.cc +++ b/chrome/browser/ui/webui/certificate_viewer_ui.cc @@ -61,7 +61,7 @@ CertificateViewerUI::CertificateViewerUI(TabContents* contents) IDR_CERTIFICATE_VIEWER_CSS); html_source->set_default_resource(IDR_CERTIFICATE_VIEWER_HTML); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/chrome_web_ui.cc b/chrome/browser/ui/webui/chrome_web_ui.cc index 4663098..91294e5 100644 --- a/chrome/browser/ui/webui/chrome_web_ui.cc +++ b/chrome/browser/ui/webui/chrome_web_ui.cc @@ -29,7 +29,7 @@ ChromeWebUI::~ChromeWebUI() { } Profile* ChromeWebUI::GetProfile() const { - return Profile::FromBrowserContext(tab_contents()->browser_context()); + return Profile::FromBrowserContext(tab_contents()->GetBrowserContext()); } bool ChromeWebUI::CanShowBookmarkBar() const { diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc index fe3c031..ad737b6 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc @@ -387,7 +387,7 @@ WebUI* ChromeWebUIFactory::CreateWebUIForURL( TabContents* tab_contents, const GURL& url) const { Profile* profile = - Profile::FromBrowserContext(tab_contents->browser_context()); + Profile::FromBrowserContext(tab_contents->GetBrowserContext()); WebUIFactoryFunction function = GetWebUIFactoryFunction(tab_contents, profile, url); if (!function) diff --git a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc index 7294f2c..7ff1fb5 100644 --- a/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc +++ b/chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc @@ -211,7 +211,7 @@ ChooseMobileNetworkUI::ChooseMobileNetworkUI(TabContents* contents) ChooseMobileNetworkHandler* handler = new ChooseMobileNetworkHandler(); AddMessageHandler((handler)->Attach(this)); // Set up the "chrome://choose-mobile-network" source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateChooseMobileNetworkUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc index 9c64749..f746ecf 100644 --- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc +++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc @@ -414,7 +414,8 @@ void WebUIHandler::OnConfigFileFetched(const ConfigFile& } if (!download_manager_) { - download_manager_ = tab_contents_->browser_context()->GetDownloadManager(); + download_manager_ = + tab_contents_->GetBrowserContext()->GetDownloadManager(); download_manager_->AddObserver(this); } if (!state_machine_->download_started()) { @@ -650,7 +651,7 @@ ImageBurnUI::ImageBurnUI(TabContents* contents) : ChromeWebUI(contents) { imageburner::WebUIHandler* handler = new imageburner::WebUIHandler(contents); AddMessageHandler((handler)->Attach(this)); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateImageburnerUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc index 3f7276a..15ce2bb 100644 --- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc +++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_utils.cc @@ -314,7 +314,7 @@ void BurnManager::FetchConfigFile(TabContents* tab_contents, config_file_requested_ = true; config_file_path_ = GetImageDir().Append(kConfigFileName); - download_manager_ = tab_contents->browser_context()->GetDownloadManager(); + download_manager_ = tab_contents->GetBrowserContext()->GetDownloadManager(); download_manager_->AddObserver(this); downloader()->AddListener(this, config_file_url_); downloader()->DownloadFile(config_file_url_, config_file_path_, tab_contents); @@ -438,7 +438,7 @@ void Downloader::OnFileStreamCreatedOnUIThread(const GURL& url, if (created_file_stream) { DownloadManager* download_manager = - tab_contents->browser_context()->GetDownloadManager(); + tab_contents->GetBrowserContext()->GetDownloadManager(); DownloadSaveInfo save_info; save_info.file_path = file_path; save_info.file_stream = linked_ptr<net::FileStream>(created_file_stream); diff --git a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc index 512a1d9..29c9022 100644 --- a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc +++ b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc @@ -287,7 +287,7 @@ void KeyboardOverlayHandler::GetLabelMap(const ListValue* args) { KeyboardOverlayUI::KeyboardOverlayUI(TabContents* contents) : HtmlDialogUI(contents) { - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); KeyboardOverlayHandler* handler = new KeyboardOverlayHandler(profile); AddMessageHandler((handler)->Attach(this)); diff --git a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc index e98bedc..7dd3e1f 100644 --- a/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc @@ -308,7 +308,7 @@ void EnterpriseOAuthEnrollmentScreenHandler::HandleCompleteLogin( } Profile* profile = - Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); + Profile::FromBrowserContext(web_ui_->tab_contents()->GetBrowserContext()); oauth_fetcher_.reset( new GaiaOAuthFetcher(this, profile->GetRequestContext(), @@ -353,7 +353,7 @@ void EnterpriseOAuthEnrollmentScreenHandler::ResetAuth() { return; Profile* profile = - Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); + Profile::FromBrowserContext(web_ui_->tab_contents()->GetBrowserContext()); browsing_data_remover_ = new BrowsingDataRemover(profile, BrowsingDataRemover::EVERYTHING, @@ -364,7 +364,7 @@ void EnterpriseOAuthEnrollmentScreenHandler::ResetAuth() { void EnterpriseOAuthEnrollmentScreenHandler::RevokeTokens() { Profile* profile = - Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()); + Profile::FromBrowserContext(web_ui_->tab_contents()->GetBrowserContext()); if (!access_token_.empty()) { new TokenRevoker(access_token_, access_token_secret_, profile); diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc index f3360c3..160fb42 100644 --- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc +++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc @@ -148,7 +148,7 @@ OobeUI::OobeUI(TabContents* contents) DictionaryValue* localized_strings = new DictionaryValue(); GetLocalizedStrings(localized_strings); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); // Set up the chrome://theme/ source, for Chrome logo. ThemeSource* theme = new ThemeSource(profile); profile->GetChromeURLDataManager()->AddDataSource(theme); diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index 1554d3a..472d7c5 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -770,7 +770,7 @@ void SigninScreenHandler::StartClearingCookies() { cookie_remover_->RemoveObserver(this); cookie_remover_ = new BrowsingDataRemover( - Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()), + Profile::FromBrowserContext(web_ui_->tab_contents()->GetBrowserContext()), BrowsingDataRemover::EVERYTHING, base::Time()); cookie_remover_->AddObserver(this); diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc index 578a66c..c6963bc 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc @@ -1371,7 +1371,7 @@ MobileSetupUI::MobileSetupUI(TabContents* contents) : ChromeWebUI(contents) { new MobileSetupUIHTMLSource(service_path); // Set up the chrome://mobilesetup/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc index dc78e10..bbb063e 100644 --- a/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc +++ b/chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc @@ -80,7 +80,7 @@ ProxySettingsUI::ProxySettingsUI(TabContents* contents) ProxySettingsHTMLSource* source = new ProxySettingsHTMLSource(localized_strings); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(source); } diff --git a/chrome/browser/ui/webui/chromeos/register_page_ui.cc b/chrome/browser/ui/webui/chromeos/register_page_ui.cc index 8bee89e..e1e582f 100644 --- a/chrome/browser/ui/webui/chromeos/register_page_ui.cc +++ b/chrome/browser/ui/webui/chromeos/register_page_ui.cc @@ -308,6 +308,6 @@ RegisterPageUI::RegisterPageUI(TabContents* contents) : ChromeWebUI(contents) { RegisterPageUIHTMLSource* html_source = new RegisterPageUIHTMLSource(); // Set up the chrome://register/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc index e08e9ed..36ef28e 100644 --- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc +++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc @@ -681,7 +681,7 @@ SimUnlockUI::SimUnlockUI(TabContents* contents) : ChromeWebUI(contents) { SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); // Set up the chrome://sim-unlock/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/chromeos/system_info_ui.cc b/chrome/browser/ui/webui/chromeos/system_info_ui.cc index 86273ab..edaf793 100644 --- a/chrome/browser/ui/webui/chromeos/system_info_ui.cc +++ b/chrome/browser/ui/webui/chromeos/system_info_ui.cc @@ -180,6 +180,6 @@ SystemInfoUI::SystemInfoUI(TabContents* contents) : ChromeWebUI(contents) { SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); // Set up the chrome://system/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc index 142bbcf..d410bc5 100644 --- a/chrome/browser/ui/webui/conflicts_ui.cc +++ b/chrome/browser/ui/webui/conflicts_ui.cc @@ -161,7 +161,7 @@ ConflictsUI::ConflictsUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new ConflictsDOMHandler())->Attach(this)); // Set up the about:conflicts source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateConflictsUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc index ddc01ab..d0cf130 100644 --- a/chrome/browser/ui/webui/crashes_ui.cc +++ b/chrome/browser/ui/webui/crashes_ui.cc @@ -163,7 +163,7 @@ CrashesUI::CrashesUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new CrashesDOMHandler())->Attach(this)); // Set up the chrome://crashes/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateCrashesUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/devtools_ui.cc b/chrome/browser/ui/webui/devtools_ui.cc index 0d1ae7f..21da8e9 100644 --- a/chrome/browser/ui/webui/devtools_ui.cc +++ b/chrome/browser/ui/webui/devtools_ui.cc @@ -101,7 +101,7 @@ void DevToolsUI::RegisterDevToolsDataSource(Profile* profile) { DevToolsUI::DevToolsUI(TabContents* contents) : ChromeWebUI(contents) { DevToolsDataSource* data_source = new DevToolsDataSource(); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(data_source); } diff --git a/chrome/browser/ui/webui/downloads_ui.cc b/chrome/browser/ui/webui/downloads_ui.cc index 60722e2..9c2edbe 100644 --- a/chrome/browser/ui/webui/downloads_ui.cc +++ b/chrome/browser/ui/webui/downloads_ui.cc @@ -93,7 +93,7 @@ DownloadsUI::DownloadsUI(TabContents* contents) : ChromeWebUI(contents) { handler->Init(); // Set up the chrome://downloads/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateDownloadsUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.cc b/chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.cc index f69b65f..8ead4b7 100644 --- a/chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.cc +++ b/chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.cc @@ -47,7 +47,7 @@ EditSearchEngineDialogUI::EditSearchEngineDialogUI(TabContents* contents) // Set default resource. source->set_default_resource(IDR_EDIT_SEARCH_ENGINE_DIALOG_HTML); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(source); } diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc index 3be781f..1340c3e 100644 --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc @@ -29,7 +29,7 @@ ChromeWebUIDataSource* CreateExtensionsHTMLSource() { } // namespace ExtensionsUI::ExtensionsUI(TabContents* contents) : ChromeWebUI(contents) { - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); ChromeWebUIDataSource* source = CreateExtensionsHTMLSource(); profile->GetChromeURLDataManager()->AddDataSource(source); profile->GetChromeURLDataManager()->AddDataSource( diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc index feeab52..c952feb 100644 --- a/chrome/browser/ui/webui/flags_ui.cc +++ b/chrome/browser/ui/webui/flags_ui.cc @@ -159,7 +159,7 @@ FlagsUI::FlagsUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new FlagsDOMHandler())->Attach(this)); // Set up the about:flags source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(CreateFlagsUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc index 3924527..d836b90 100644 --- a/chrome/browser/ui/webui/flash_ui.cc +++ b/chrome/browser/ui/webui/flash_ui.cc @@ -371,7 +371,7 @@ FlashUI::FlashUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new FlashDOMHandler())->Attach(this)); // Set up the about:flash source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(CreateFlashUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/gpu_internals_ui.cc b/chrome/browser/ui/webui/gpu_internals_ui.cc index cb9087b..4aed34117 100644 --- a/chrome/browser/ui/webui/gpu_internals_ui.cc +++ b/chrome/browser/ui/webui/gpu_internals_ui.cc @@ -247,6 +247,6 @@ GpuInternalsUI::GpuInternalsUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new GpuMessageHandler())->Attach(this)); // Set up the chrome://gpu-internals/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(CreateGpuHTMLSource()); } diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc index 9e6209c..b6f0b10 100644 --- a/chrome/browser/ui/webui/history_ui.cc +++ b/chrome/browser/ui/webui/history_ui.cc @@ -428,7 +428,7 @@ HistoryUI::HistoryUI(TabContents* contents) : ChromeWebUI(contents) { HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); // Set up the chrome://history/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/hung_renderer_dialog_ui.cc b/chrome/browser/ui/webui/hung_renderer_dialog_ui.cc index 3f896cd..0b3f7e9 100644 --- a/chrome/browser/ui/webui/hung_renderer_dialog_ui.cc +++ b/chrome/browser/ui/webui/hung_renderer_dialog_ui.cc @@ -34,7 +34,7 @@ HungRendererDialogUI::HungRendererDialogUI(TabContents* contents) // Set default resource. source->set_default_resource(IDR_HUNG_RENDERER_DIALOG_HTML); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(source); // Set up the chrome://theme/ source. diff --git a/chrome/browser/ui/webui/input_window_dialog_ui.cc b/chrome/browser/ui/webui/input_window_dialog_ui.cc index 7b14efc..913d765 100644 --- a/chrome/browser/ui/webui/input_window_dialog_ui.cc +++ b/chrome/browser/ui/webui/input_window_dialog_ui.cc @@ -25,7 +25,7 @@ InputWindowDialogUI::InputWindowDialogUI(TabContents* contents) // Set default resource. source->set_default_resource(IDR_INPUT_WINDOW_DIALOG_HTML); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(source); } diff --git a/chrome/browser/ui/webui/keyboard_ui.cc b/chrome/browser/ui/webui/keyboard_ui.cc index b18e21c..cae330e0 100644 --- a/chrome/browser/ui/webui/keyboard_ui.cc +++ b/chrome/browser/ui/webui/keyboard_ui.cc @@ -19,7 +19,7 @@ KeyboardUI::KeyboardUI(TabContents* contents) : ChromeWebUI(contents) { KeyboardHTMLSource* html_source = new KeyboardHTMLSource(); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/media/media_internals_ui.cc b/chrome/browser/ui/webui/media/media_internals_ui.cc index fded7ac..7ca2848 100644 --- a/chrome/browser/ui/webui/media/media_internals_ui.cc +++ b/chrome/browser/ui/webui/media/media_internals_ui.cc @@ -40,7 +40,7 @@ MediaInternalsUI::MediaInternalsUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new MediaInternalsMessageHandler())->Attach(this)); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateMediaInternalsHTMLSource()); } diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc index e08d377..a4e6907 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc @@ -109,7 +109,7 @@ NewTabUI::NewTabUI(TabContents* contents) InitializeCSSCaches(); NewTabHTMLSource* html_source = new NewTabHTMLSource(GetProfile()->GetOriginalProfile()); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); // Listen for theme installation. diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc index a32f584..329c03b 100644 --- a/chrome/browser/ui/webui/options/advanced_options_handler.cc +++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc @@ -389,7 +389,7 @@ void AdvancedOptionsHandler::OnCloudPrintSetupClosed() { void AdvancedOptionsHandler::HandleAutoOpenButton(const ListValue* args) { content::RecordAction(UserMetricsAction("Options_ResetAutoOpenFiles")); DownloadManager* manager = - web_ui_->tab_contents()->browser_context()->GetDownloadManager(); + web_ui_->tab_contents()->GetBrowserContext()->GetDownloadManager(); if (manager) DownloadPrefs::FromDownloadManager(manager)->ResetAutoOpen(); } @@ -617,7 +617,7 @@ void AdvancedOptionsHandler::SetupAutoOpenFileTypesDisabledAttribute() { // Set the enabled state for the AutoOpenFileTypesResetToDefault button. // We enable the button if the user has any auto-open file types registered. DownloadManager* manager = - web_ui_->tab_contents()->browser_context()->GetDownloadManager(); + web_ui_->tab_contents()->GetBrowserContext()->GetDownloadManager(); bool disabled = !(manager && DownloadPrefs::FromDownloadManager(manager)->IsAutoOpenUsed()); base::FundamentalValue value(disabled); diff --git a/chrome/browser/ui/webui/options/options_ui.cc b/chrome/browser/ui/webui/options/options_ui.cc index 51433e9..cdcdde0 100644 --- a/chrome/browser/ui/webui/options/options_ui.cc +++ b/chrome/browser/ui/webui/options/options_ui.cc @@ -272,7 +272,7 @@ OptionsUI::OptionsUI(TabContents* contents) new OptionsUIHTMLSource(localized_strings); // Set up the chrome://settings/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); // Set up the chrome://theme/ source. diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc index 5d53dc5..e0aa630 100644 --- a/chrome/browser/ui/webui/options/personal_options_handler.cc +++ b/chrome/browser/ui/webui/options/personal_options_handler.cc @@ -410,7 +410,7 @@ void PersonalOptionsHandler::SendProfilesInfo() { g_browser_process->profile_manager()->GetProfileInfoCache(); ListValue profile_info_list; FilePath current_profile_path = - web_ui_->tab_contents()->browser_context()->GetPath(); + web_ui_->tab_contents()->GetBrowserContext()->GetPath(); for (size_t i = 0, e = cache.GetNumberOfProfiles(); i < e; ++i) { DictionaryValue* profile_value = new DictionaryValue(); FilePath profile_path = cache.GetPathOfProfileAtIndex(i); diff --git a/chrome/browser/ui/webui/options2/advanced_options_handler2.cc b/chrome/browser/ui/webui/options2/advanced_options_handler2.cc index 72e6f4c..02f8e1b 100644 --- a/chrome/browser/ui/webui/options2/advanced_options_handler2.cc +++ b/chrome/browser/ui/webui/options2/advanced_options_handler2.cc @@ -391,7 +391,7 @@ void AdvancedOptionsHandler::OnCloudPrintSetupClosed() { void AdvancedOptionsHandler::HandleAutoOpenButton(const ListValue* args) { content::RecordAction(UserMetricsAction("Options_ResetAutoOpenFiles")); DownloadManager* manager = - web_ui_->tab_contents()->browser_context()->GetDownloadManager(); + web_ui_->tab_contents()->GetBrowserContext()->GetDownloadManager(); if (manager) DownloadPrefs::FromDownloadManager(manager)->ResetAutoOpen(); } @@ -619,7 +619,7 @@ void AdvancedOptionsHandler::SetupAutoOpenFileTypesDisabledAttribute() { // Set the enabled state for the AutoOpenFileTypesResetToDefault button. // We enable the button if the user has any auto-open file types registered. DownloadManager* manager = - web_ui_->tab_contents()->browser_context()->GetDownloadManager(); + web_ui_->tab_contents()->GetBrowserContext()->GetDownloadManager(); bool disabled = !(manager && DownloadPrefs::FromDownloadManager(manager)->IsAutoOpenUsed()); base::FundamentalValue value(disabled); diff --git a/chrome/browser/ui/webui/options2/options_ui2.cc b/chrome/browser/ui/webui/options2/options_ui2.cc index fc5cba8..0439ff8 100644 --- a/chrome/browser/ui/webui/options2/options_ui2.cc +++ b/chrome/browser/ui/webui/options2/options_ui2.cc @@ -270,7 +270,7 @@ OptionsUI::OptionsUI(TabContents* contents) new OptionsUIHTMLSource(localized_strings); // Set up the chrome://settings-frame/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); // Set up the chrome://theme/ source. diff --git a/chrome/browser/ui/webui/options2/personal_options_handler2.cc b/chrome/browser/ui/webui/options2/personal_options_handler2.cc index c756cc7..64d5093 100644 --- a/chrome/browser/ui/webui/options2/personal_options_handler2.cc +++ b/chrome/browser/ui/webui/options2/personal_options_handler2.cc @@ -412,7 +412,7 @@ void PersonalOptionsHandler::SendProfilesInfo() { g_browser_process->profile_manager()->GetProfileInfoCache(); ListValue profile_info_list; FilePath current_profile_path = - web_ui_->tab_contents()->browser_context()->GetPath(); + web_ui_->tab_contents()->GetBrowserContext()->GetPath(); for (size_t i = 0, e = cache.GetNumberOfProfiles(); i < e; ++i) { DictionaryValue* profile_value = new DictionaryValue(); FilePath profile_path = cache.GetPathOfProfileAtIndex(i); diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index e4449cb..6f49abd 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -380,7 +380,7 @@ PluginsUI::PluginsUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new PluginsDOMHandler())->Attach(this)); // Set up the chrome://plugins/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreatePluginsUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc index 3d7106c..4bd7ade 100644 --- a/chrome/browser/ui/webui/policy_ui.cc +++ b/chrome/browser/ui/webui/policy_ui.cc @@ -234,7 +234,7 @@ PolicyUI::PolicyUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new PolicyUIHandler)->Attach(this)); // Set up the chrome://policy/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(CreatePolicyUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview_ui.cc index f16a03f..543af45 100644 --- a/chrome/browser/ui/webui/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview_ui.cc @@ -82,7 +82,7 @@ PrintPreviewUI::PrintPreviewUI(TabContents* contents) is_dummy_ = (!controller || !controller->is_creating_print_preview_tab()); // Set up the chrome://print/ data source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( new PrintPreviewDataSource(is_dummy_)); if (is_dummy_) diff --git a/chrome/browser/ui/webui/profiler_ui.cc b/chrome/browser/ui/webui/profiler_ui.cc index b57a9ab..594ad5b 100644 --- a/chrome/browser/ui/webui/profiler_ui.cc +++ b/chrome/browser/ui/webui/profiler_ui.cc @@ -155,7 +155,7 @@ ProfilerUI::ProfilerUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new ProfilerMessageHandler())->Attach(this)); // Set up the chrome://profiler/ source. - Profile::FromBrowserContext(contents->browser_context())-> + Profile::FromBrowserContext(contents->GetBrowserContext())-> GetChromeURLDataManager()->AddDataSource(CreateProfilerHTMLSource()); } diff --git a/chrome/browser/ui/webui/quota_internals_ui.cc b/chrome/browser/ui/webui/quota_internals_ui.cc index 793bc42..b91ed18 100644 --- a/chrome/browser/ui/webui/quota_internals_ui.cc +++ b/chrome/browser/ui/webui/quota_internals_ui.cc @@ -39,7 +39,7 @@ QuotaInternalsUI::QuotaInternalsUI(TabContents* contents) : ChromeWebUI(contents) { WebUIMessageHandler* handler = new quota_internals::QuotaInternalsHandler; AddMessageHandler(handler->Attach(this)); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateQuotaInternalsHTMLSource()); } diff --git a/chrome/browser/ui/webui/sessions_ui.cc b/chrome/browser/ui/webui/sessions_ui.cc index 946fc47f..fcc7709 100644 --- a/chrome/browser/ui/webui/sessions_ui.cc +++ b/chrome/browser/ui/webui/sessions_ui.cc @@ -262,7 +262,7 @@ SessionsUI::SessionsUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new SessionsDOMHandler())->Attach(this)); // Set up the chrome://sessions/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateSessionsUIHTMLSource()); } diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc index ef53b9b..8d054c4 100644 --- a/chrome/browser/ui/webui/sync_internals_ui.cc +++ b/chrome/browser/ui/webui/sync_internals_ui.cc @@ -76,7 +76,7 @@ SyncInternalsUI::SyncInternalsUI(TabContents* contents) : ChromeWebUI(contents), weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { // TODO(akalin): Fix. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource( CreateSyncInternalsHTMLSource()); ProfileSyncService* sync_service = GetProfileSyncService(profile); diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc index 6c809c4..9f92d22 100644 --- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc @@ -112,7 +112,7 @@ SyncPromoUI::SyncPromoUI(TabContents* contents) : ChromeWebUI(contents) { handler->Attach(this); // Set up the chrome://theme/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); ThemeSource* theme = new ThemeSource(profile); profile->GetChromeURLDataManager()->AddDataSource(theme); diff --git a/chrome/browser/ui/webui/task_manager_ui.cc b/chrome/browser/ui/webui/task_manager_ui.cc index 0359b69..5252c55 100644 --- a/chrome/browser/ui/webui/task_manager_ui.cc +++ b/chrome/browser/ui/webui/task_manager_ui.cc @@ -85,6 +85,6 @@ TaskManagerUI::TaskManagerUI(TabContents* contents) : ChromeWebUI(contents) { // Set up the chrome://taskmanager/ source. ChromeWebUIDataSource* html_source = CreateTaskManagerUIHTMLSource(); - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } diff --git a/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc b/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc index 3176cd1..8231c93 100644 --- a/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc +++ b/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc @@ -38,7 +38,7 @@ WebUI::TypeID TestChromeWebUIFactory::GetWebUIType( WebUI* TestChromeWebUIFactory::CreateWebUIForURL(TabContents* tab_contents, const GURL& url) const { Profile* profile = - Profile::FromBrowserContext(tab_contents->browser_context()); + Profile::FromBrowserContext(tab_contents->GetBrowserContext()); WebUIProvider* provider = GetWebUIProvider(profile, url); return provider ? provider->NewWebUI(tab_contents, url) : ChromeWebUIFactory::CreateWebUIForURL(tab_contents, url); diff --git a/chrome/browser/ui/webui/tracing_ui.cc b/chrome/browser/ui/webui/tracing_ui.cc index 5c83c0d..571f9d2 100644 --- a/chrome/browser/ui/webui/tracing_ui.cc +++ b/chrome/browser/ui/webui/tracing_ui.cc @@ -419,6 +419,6 @@ TracingUI::TracingUI(TabContents* contents) : ChromeWebUI(contents) { AddMessageHandler((new TracingMessageHandler())->Attach(this)); // Set up the chrome://tracing/ source. - Profile::FromBrowserContext(contents->browser_context())-> + Profile::FromBrowserContext(contents->GetBrowserContext())-> GetChromeURLDataManager()->AddDataSource(CreateTracingHTMLSource()); } diff --git a/chrome/browser/ui/webui/uber/uber_ui.cc b/chrome/browser/ui/webui/uber/uber_ui.cc index ded7554..97a4778 100644 --- a/chrome/browser/ui/webui/uber/uber_ui.cc +++ b/chrome/browser/ui/webui/uber/uber_ui.cc @@ -30,7 +30,7 @@ ChromeWebUIDataSource* CreateUberHTMLSource() { } // namespace UberUI::UberUI(TabContents* contents) : ChromeWebUI(contents) { - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(CreateUberHTMLSource()); RegisterSubpage(chrome::kChromeUISettingsFrameURL); diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc index 40f0eee..dc78455 100644 --- a/chrome/browser/ui/webui/web_ui_unittest.cc +++ b/chrome/browser/ui/webui/web_ui_unittest.cc @@ -167,8 +167,8 @@ class TabContentsForFocusTest : public TestTabContents { TEST_F(WebUITest, FocusOnNavigate) { // Setup. |tc| will be used to track when we try to focus the location bar. TabContentsForFocusTest* tc = new TabContentsForFocusTest( - contents()->browser_context(), - SiteInstance::CreateSiteInstance(contents()->browser_context())); + contents()->GetBrowserContext(), + SiteInstance::CreateSiteInstance(contents()->GetBrowserContext())); tc->GetController().CopyStateFrom(controller()); SetContents(tc); int page_id = 200; diff --git a/chrome/browser/ui/webui/workers_ui.cc b/chrome/browser/ui/webui/workers_ui.cc index 1dc7e0d..a0b0a3c 100644 --- a/chrome/browser/ui/webui/workers_ui.cc +++ b/chrome/browser/ui/webui/workers_ui.cc @@ -257,7 +257,7 @@ WorkersUI::WorkersUI(TabContents* contents) WorkersUIHTMLSource* html_source = new WorkersUIHTMLSource(); // Set up the chrome://workers/ source. - Profile* profile = Profile::FromBrowserContext(contents->browser_context()); + Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); profile->GetChromeURLDataManager()->AddDataSource(html_source); } |