diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-27 21:38:17 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-27 21:38:17 +0000 |
commit | d583e3f2463dd1d216c92923e2eb9a9ba6066676 (patch) | |
tree | dcb942878d5bd6b548ae28555df88f49cdb988cc /chrome | |
parent | 4806e850ba4d2fbc633ff2efebef757fbd050a8f (diff) | |
download | chromium_src-d583e3f2463dd1d216c92923e2eb9a9ba6066676.zip chromium_src-d583e3f2463dd1d216c92923e2eb9a9ba6066676.tar.gz chromium_src-d583e3f2463dd1d216c92923e2eb9a9ba6066676.tar.bz2 |
Move FaviconStatus and SSLStatus out of NavigationEntry into their own files in content/public and in the content namespace. I've also made them structs instead of classes. This was because I didn't want to wrap them with Content API for what were really a collection of member variables. The one exception was SSLStatus::content_status which had helper functions around it to set and get the bitfield. Each of the two setter helpers were only called in one non-test code, and read in a few places, so I just converted them to do it directly.
BUG=98716
Review URL: http://codereview.chromium.org/9048002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
82 files changed, 272 insertions, 171 deletions
diff --git a/chrome/browser/automation/automation_tab_helper.cc b/chrome/browser/automation/automation_tab_helper.cc index d012852..3c5a2ea 100644 --- a/chrome/browser/automation/automation_tab_helper.cc +++ b/chrome/browser/automation/automation_tab_helper.cc @@ -7,7 +7,6 @@ #include <algorithm> #include "chrome/common/automation_messages.h" -#include "content/browser/tab_contents/navigation_controller.h" #include "content/public/browser/web_contents.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 7732c2dd..a64aa52 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -117,6 +117,7 @@ #include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/interstitial_page.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/plugin_service.h" @@ -153,6 +154,7 @@ using content::ChildProcessHost; using content::DownloadItem; using content::DownloadManager; using content::PluginService; +using content::SSLStatus; using content::WebContents; namespace { @@ -1567,9 +1569,9 @@ void TestingAutomationProvider::GetSecurityState( NavigationController* tab = tab_tracker_->GetResource(handle); NavigationEntry* entry = tab->GetActiveEntry(); *success = true; - *security_style = entry->ssl().security_style(); - *ssl_cert_status = entry->ssl().cert_status(); - *insecure_content_status = entry->ssl().content_status(); + *security_style = entry->GetSSL().security_style; + *ssl_cert_status = entry->GetSSL().cert_status; + *insecure_content_status = entry->GetSSL().content_status; } else { *success = false; *security_style = content::SECURITY_STYLE_UNKNOWN; @@ -2978,12 +2980,13 @@ void TestingAutomationProvider::GetNavigationInfo( style_to_string[content::SECURITY_STYLE_AUTHENTICATED] = "SECURITY_STYLE_AUTHENTICATED"; - NavigationEntry::SSLStatus ssl_status = nav_entry->ssl(); + SSLStatus ssl_status = nav_entry->GetSSL(); ssl->SetString("security_style", - style_to_string[ssl_status.security_style()]); - ssl->SetBoolean("ran_insecure_content", ssl_status.ran_insecure_content()); + style_to_string[ssl_status.security_style]); + ssl->SetBoolean("ran_insecure_content", + !!(ssl_status.content_status & SSLStatus::RAN_INSECURE_CONTENT)); ssl->SetBoolean("displayed_insecure_content", - ssl_status.displayed_insecure_content()); + !!(ssl_status.content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT)); return_value->Set("ssl", ssl); // Page type. @@ -2995,7 +2998,7 @@ void TestingAutomationProvider::GetNavigationInfo( return_value->SetString("page_type", pagetype_to_string[nav_entry->page_type()]); - return_value->SetString("favicon_url", nav_entry->favicon().url().spec()); + return_value->SetString("favicon_url", nav_entry->GetFavicon().url.spec()); reply.SendSuccess(return_value.get()); } diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index db55df5..c9c4b0c 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -21,6 +21,7 @@ #include "chrome/browser/ui/browser_list.h" #include "content/public/browser/notification_registrar.h" #include "content/public/common/page_type.h" +#include "content/public/common/security_style.h" #include "net/base/cert_status_flags.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc index e1e50a3..499acd7 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.cc +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc @@ -25,6 +25,7 @@ #include "chrome/common/render_messages.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_view_host_delegate.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/web_contents.h" diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc index 5e9c5b3..0098429 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc @@ -12,6 +12,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index fdde969..324b843 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -189,8 +189,8 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents, // Wipe out page icon so that the default application icon is used. NavigationEntry* entry = tab_contents_->tab_contents()->GetController().GetActiveEntry(); - entry->favicon().set_bitmap(SkBitmap()); - entry->favicon().set_is_valid(true); + entry->GetFavicon().bitmap = SkBitmap(); + entry->GetFavicon().valid = true; // Register on-load actions. registrar_.Add( diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc index c6f5c00..ccf3d9b 100644 --- a/chrome/browser/extensions/app_process_apitest.cc +++ b/chrome/browser/extensions/app_process_apitest.cc @@ -18,6 +18,7 @@ #include "chrome/common/string_ordinal.h" #include "chrome/test/base/ui_test_utils.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" #include "content/test/test_navigation_observer.h" diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc index bb56b39..e5d8c72 100644 --- a/chrome/browser/extensions/extension_browsertests_misc.cc +++ b/chrome/browser/extensions/extension_browsertests_misc.cc @@ -26,6 +26,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/site_instance.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" #include "net/base/net_util.h" diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc index e30323b..63231bc 100644 --- a/chrome/browser/extensions/extension_override_apitest.cc +++ b/chrome/browser/extensions/extension_override_apitest.cc @@ -12,6 +12,7 @@ #include "chrome/browser/ui/browser_list.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/ui_test_utils.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" class ExtensionOverrideTest : public ExtensionApiTest { diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc index d5236a9..ceea844 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc @@ -12,6 +12,7 @@ #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/sessions/restore_tab_helper.h" #include "chrome/browser/extensions/extension_tabs_module_constants.h" +#include "content/browser/tab_contents/navigation_entry.h" namespace keys = extension_tabs_module_constants; namespace errors = extension_manifest_errors; @@ -119,8 +120,8 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(const WebContents* contents, if (!is_loading) { NavigationEntry* entry = contents->GetController().GetActiveEntry(); if (entry) { - if (entry->favicon().is_valid()) - result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec()); + if (entry->GetFavicon().valid) + result->SetString(keys::kFaviconUrlKey, entry->GetFavicon().url.spec()); } } diff --git a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc index 8bb5593..7835371 100644 --- a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc +++ b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc @@ -15,6 +15,7 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/ui_test_utils.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc index a88157f..02c4b79 100644 --- a/chrome/browser/extensions/webstore_installer.cc +++ b/chrome/browser/extensions/webstore_installer.cc @@ -23,6 +23,7 @@ #include "chrome/common/extensions/extension_constants.h" #include "content/browser/download/download_types.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_file.h" #include "content/public/browser/download_manager.h" diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index d29bc5e..bd797c1 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -42,6 +42,7 @@ #include "content/browser/load_notification_details.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/provisional_load_details.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/navigation_details.h" @@ -65,6 +66,7 @@ #include "ui/views/layout/grid_layout.h" using content::BrowserThread; +using content::SSLStatus; using content::WebContents; using ui::ViewProp; using WebKit::WebCString; @@ -968,10 +970,12 @@ bool ExternalTabContainer::InitNavigationInfo(NavigationInfo* nav_info, if (nav_info->title.empty()) nav_info->title = UTF8ToWide(nav_info->url.spec()); - nav_info->security_style = entry->ssl().security_style(); + nav_info->security_style = entry->GetSSL().security_style; + int content_status = entry->GetSSL().content_status; nav_info->displayed_insecure_content = - entry->ssl().displayed_insecure_content(); - nav_info->ran_insecure_content = entry->ssl().ran_insecure_content(); + !!(content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT); + nav_info->ran_insecure_content = + !!(content_status & SSLStatus::RAN_INSECURE_CONTENT); return true; } diff --git a/chrome/browser/favicon/favicon_handler.cc b/chrome/browser/favicon/favicon_handler.cc index d317252..3ef1ca9 100644 --- a/chrome/browser/favicon/favicon_handler.cc +++ b/chrome/browser/favicon/favicon_handler.cc @@ -155,12 +155,12 @@ void FaviconHandler::UpdateFavicon(NavigationEntry* entry, void FaviconHandler::UpdateFavicon(NavigationEntry* entry, const gfx::Image* image) { // No matter what happens, we need to mark the favicon as being set. - entry->favicon().set_is_valid(true); + entry->GetFavicon().valid = true; if (!image) return; - entry->favicon().set_bitmap(*image); + entry->GetFavicon().bitmap = *image; delegate_->NotifyFaviconUpdated(); } @@ -195,12 +195,12 @@ void FaviconHandler::OnUpdateFaviconURL( // For FAVICON. if (current_candidate()->icon_type == FaviconURL::FAVICON) { - if (!favicon_expired_ && entry->favicon().is_valid() && - DoUrlAndIconMatch(*current_candidate(), entry->favicon().url(), + if (!favicon_expired_ && entry->GetFavicon().valid && + DoUrlAndIconMatch(*current_candidate(), entry->GetFavicon().url, history::FAVICON)) return; - entry->favicon().set_url(current_candidate()->icon_url); + entry->GetFavicon().url = current_candidate()->icon_url; } else if (!favicon_expired_ && got_favicon_from_history_ && history_icon_.is_valid() && DoUrlAndIconMatch( @@ -322,7 +322,7 @@ void FaviconHandler::OnFaviconDataForInitialURL( favicon_expired_ = (favicon.known_icon && favicon.expired); if (favicon.known_icon && favicon.icon_type == history::FAVICON && - !entry->favicon().is_valid() && + !entry->GetFavicon().valid && (!current_candidate() || DoUrlAndIconMatch( *current_candidate(), favicon.icon_url, favicon.icon_type))) { @@ -330,10 +330,10 @@ void FaviconHandler::OnFaviconDataForInitialURL( // doesn't have an icon. Set the favicon now, and if the favicon turns out // to be expired (or the wrong url) we'll fetch later on. This way the // user doesn't see a flash of the default favicon. - entry->favicon().set_url(favicon.icon_url); + entry->GetFavicon().url = favicon.icon_url; if (favicon.is_valid()) UpdateFavicon(entry, favicon.image_data); - entry->favicon().set_is_valid(true); + entry->GetFavicon().valid = true; } if (favicon.known_icon && !favicon.expired) { @@ -405,7 +405,7 @@ void FaviconHandler::OnFaviconData(FaviconService::Handle handle, if (!favicon.known_icon || favicon.expired) { // We don't know the favicon, or it is out of date. Request the current // one. - ScheduleDownload(entry->GetURL(), entry->favicon().url(), + ScheduleDownload(entry->GetURL(), entry->GetFavicon().url, preferred_icon_size(), history::FAVICON, FaviconTabHelper::ImageDownloadCallback()); diff --git a/chrome/browser/favicon/favicon_handler_unittest.cc b/chrome/browser/favicon/favicon_handler_unittest.cc index 1358ba5..525c2ca 100644 --- a/chrome/browser/favicon/favicon_handler_unittest.cc +++ b/chrome/browser/favicon/favicon_handler_unittest.cc @@ -337,8 +337,8 @@ TEST_F(FaviconHandlerTest, GetFaviconFromHistory) { // Send history response. history_handler->InvokeCallback(); // Verify FaviconHandler status - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_EQ(icon_url, helper.GetEntry()->favicon().url()); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_EQ(icon_url, helper.GetEntry()->GetFavicon().url); // Simulates update favicon url. std::vector<FaviconURL> urls; @@ -382,8 +382,8 @@ TEST_F(FaviconHandlerTest, DownloadFavicon) { // Send history response. history_handler->InvokeCallback(); // Verify FaviconHandler status - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_EQ(icon_url, helper.GetEntry()->favicon().url()); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_EQ(icon_url, helper.GetEntry()->GetFavicon().url); // Simulates update favicon url. std::vector<FaviconURL> urls; @@ -418,9 +418,9 @@ TEST_F(FaviconHandlerTest, DownloadFavicon) { EXPECT_EQ(page_url, history_handler->page_url_); // Verify NavigationEntry. - EXPECT_EQ(icon_url, helper.GetEntry()->favicon().url()); - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_FALSE(helper.GetEntry()->favicon().bitmap().empty()); + EXPECT_EQ(icon_url, helper.GetEntry()->GetFavicon().url); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_FALSE(helper.GetEntry()->GetFavicon().bitmap.empty()); } TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) { @@ -454,8 +454,8 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) { // Send history response. history_handler->InvokeCallback(); // Verify FaviconHandler status. - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_EQ(icon_url, helper.GetEntry()->favicon().url()); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_EQ(icon_url, helper.GetEntry()->GetFavicon().url); // Reset the history_handler to verify whether new icon is requested from // history. @@ -472,7 +472,7 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) { ASSERT_EQ(new_icon_url, helper.current_candidate()->icon_url); ASSERT_EQ(FaviconURL::FAVICON, helper.current_candidate()->icon_type); // The favicon status's url should be updated. - ASSERT_EQ(new_icon_url, helper.GetEntry()->favicon().url()); + ASSERT_EQ(new_icon_url, helper.GetEntry()->GetFavicon().url); // Favicon should be requested from history. history_handler = helper.history_handler(); @@ -507,9 +507,9 @@ TEST_F(FaviconHandlerTest, UpdateAndDownloadFavicon) { EXPECT_EQ(page_url, history_handler->page_url_); // Verify NavigationEntry. - EXPECT_EQ(new_icon_url, helper.GetEntry()->favicon().url()); - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_FALSE(helper.GetEntry()->favicon().bitmap().empty()); + EXPECT_EQ(new_icon_url, helper.GetEntry()->GetFavicon().url); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_FALSE(helper.GetEntry()->GetFavicon().bitmap.empty()); } TEST_F(FaviconHandlerTest, UpdateFavicon) { @@ -543,8 +543,8 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) { // Send history response. history_handler->InvokeCallback(); // Verify FaviconHandler status. - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_EQ(icon_url, helper.GetEntry()->favicon().url()); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_EQ(icon_url, helper.GetEntry()->GetFavicon().url); // Reset the history_handler to verify whether new icon is requested from // history. @@ -561,7 +561,7 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) { ASSERT_EQ(new_icon_url, helper.current_candidate()->icon_url); ASSERT_EQ(FaviconURL::FAVICON, helper.current_candidate()->icon_type); // The favicon status's url should be updated. - ASSERT_EQ(new_icon_url, helper.GetEntry()->favicon().url()); + ASSERT_EQ(new_icon_url, helper.GetEntry()->GetFavicon().url); // Favicon should be requested from history. history_handler = helper.history_handler(); @@ -582,9 +582,9 @@ TEST_F(FaviconHandlerTest, UpdateFavicon) { EXPECT_FALSE(helper.download_handler()); // Verify the favicon status. - EXPECT_EQ(new_icon_url, helper.GetEntry()->favicon().url()); - EXPECT_TRUE(helper.GetEntry()->favicon().is_valid()); - EXPECT_FALSE(helper.GetEntry()->favicon().bitmap().empty()); + EXPECT_EQ(new_icon_url, helper.GetEntry()->GetFavicon().url); + EXPECT_TRUE(helper.GetEntry()->GetFavicon().valid); + EXPECT_FALSE(helper.GetEntry()->GetFavicon().bitmap.empty()); } TEST_F(FaviconHandlerTest, Download2ndFaviconURLCandidate) { @@ -612,8 +612,8 @@ TEST_F(FaviconHandlerTest, Download2ndFaviconURLCandidate) { // Send history response. history_handler->InvokeCallback(); // Verify FaviconHandler status. - EXPECT_FALSE(helper.GetEntry()->favicon().is_valid()); - EXPECT_EQ(GURL(), helper.GetEntry()->favicon().url()); + EXPECT_FALSE(helper.GetEntry()->GetFavicon().valid); + EXPECT_EQ(GURL(), helper.GetEntry()->GetFavicon().url); // Reset the history_handler to verify whether new icon is requested from // history. @@ -730,8 +730,8 @@ TEST_F(FaviconHandlerTest, UpdateDuringDownloading) { // Send history response. history_handler->InvokeCallback(); // Verify FaviconHandler status. - EXPECT_FALSE(helper.GetEntry()->favicon().is_valid()); - EXPECT_EQ(GURL(), helper.GetEntry()->favicon().url()); + EXPECT_FALSE(helper.GetEntry()->GetFavicon().valid); + EXPECT_EQ(GURL(), helper.GetEntry()->GetFavicon().url); // Reset the history_handler to verify whether new icon is requested from // history. diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc index 282cf1c..88fe4a4 100644 --- a/chrome/browser/favicon/favicon_tab_helper.cc +++ b/chrome/browser/favicon/favicon_tab_helper.cc @@ -12,6 +12,7 @@ #include "chrome/common/icon_messages.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/webui/web_ui.h" #include "content/public/browser/navigation_details.h" @@ -20,6 +21,7 @@ #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/image/image.h" +using content::FaviconStatus; using content::WebContents; FaviconTabHelper::FaviconTabHelper(TabContents* tab_contents) @@ -47,11 +49,11 @@ SkBitmap FaviconTabHelper::GetFavicon() const { const NavigationController& controller = web_contents()->GetController(); NavigationEntry* entry = controller.GetTransientEntry(); if (entry) - return entry->favicon().bitmap(); + return entry->GetFavicon().bitmap; entry = controller.GetLastCommittedEntry(); if (entry) - return entry->favicon().bitmap(); + return entry->GetFavicon().bitmap; return SkBitmap(); } @@ -59,11 +61,11 @@ bool FaviconTabHelper::FaviconIsValid() const { const NavigationController& controller = web_contents()->GetController(); NavigationEntry* entry = controller.GetTransientEntry(); if (entry) - return entry->favicon().is_valid(); + return entry->GetFavicon().valid; entry = controller.GetLastCommittedEntry(); if (entry) - return entry->favicon().is_valid(); + return entry->GetFavicon().valid; return false; } @@ -97,15 +99,15 @@ void FaviconTabHelper::SaveFavicon() { GetOriginalProfile()->GetFaviconService(Profile::IMPLICIT_ACCESS); if (!service) return; - const NavigationEntry::FaviconStatus& favicon(entry->favicon()); - if (!favicon.is_valid() || favicon.url().is_empty() || - favicon.bitmap().empty()) { + const FaviconStatus& favicon(entry->GetFavicon()); + if (!favicon.valid || favicon.url.is_empty() || + favicon.bitmap.empty()) { return; } std::vector<unsigned char> image_data; - gfx::PNGCodec::EncodeBGRASkBitmap(favicon.bitmap(), false, &image_data); + gfx::PNGCodec::EncodeBGRASkBitmap(favicon.bitmap, false, &image_data); service->SetFavicon( - entry->GetURL(), favicon.url(), image_data, history::FAVICON); + entry->GetURL(), favicon.url, image_data, history::FAVICON); } int FaviconTabHelper::DownloadImage(const GURL& image_url, diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc index 50f1c0b..63c7771 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc @@ -24,6 +24,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/geolocation/geolocation_provider.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/navigation_details.h" diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc index 293f99f..cd5e0fc 100644 --- a/chrome/browser/google/google_url_tracker.cc +++ b/chrome/browser/google/google_url_tracker.cc @@ -21,6 +21,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" #include "content/public/common/url_fetcher.h" diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index 99c115d..09ea82e 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -346,13 +346,13 @@ void InstantLoader::TabContentsDelegateImpl::CommitHistory( FaviconService* favicon_service = tab->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS); - if (favicon_service && active_entry->favicon().is_valid() && - !active_entry->favicon().bitmap().empty()) { + if (favicon_service && active_entry->GetFavicon().valid && + !active_entry->GetFavicon().bitmap.empty()) { std::vector<unsigned char> image_data; - gfx::PNGCodec::EncodeBGRASkBitmap(active_entry->favicon().bitmap(), false, + gfx::PNGCodec::EncodeBGRASkBitmap(active_entry->GetFavicon().bitmap, false, &image_data); favicon_service->SetFavicon(active_entry->GetURL(), - active_entry->favicon().url(), + active_entry->GetFavicon().url, image_data, history::FAVICON); if (supports_instant && !add_page_vector_.empty()) { @@ -361,7 +361,7 @@ void InstantLoader::TabContentsDelegateImpl::CommitHistory( // url we're adding to history (see comment in ReleasePreviewContents // for details). favicon_service->SetFavicon(add_page_vector_.back()->url, - active_entry->favicon().url(), + active_entry->GetFavicon().url, image_data, history::FAVICON); } diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc index f0007ef..a1aed0c 100644 --- a/chrome/browser/omnibox_search_hint.cc +++ b/chrome/browser/omnibox_search_hint.cc @@ -28,6 +28,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_details.h" diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc index 64119cc..6b0d4a2 100644 --- a/chrome/browser/page_info_model.cc +++ b/chrome/browser/page_info_model.cc @@ -18,6 +18,7 @@ #include "chrome/browser/ssl/ssl_error_info.h" #include "content/browser/cert_store.h" #include "content/browser/ssl/ssl_manager.h" +#include "content/public/browser/ssl_status.h" #include "content/public/common/url_constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -29,9 +30,11 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +using content::SSLStatus; + PageInfoModel::PageInfoModel(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history, PageInfoModelObserver* observer) : observer_(observer) { @@ -60,12 +63,12 @@ PageInfoModel::PageInfoModel(Profile* profile, empty_subject_name = true; } - if (ssl.cert_id() && - CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), &cert) && - (!net::IsCertStatusError(ssl.cert_status()) || - net::IsCertStatusMinorError(ssl.cert_status()))) { + if (ssl.cert_id && + CertStore::GetInstance()->RetrieveCert(ssl.cert_id, &cert) && + (!net::IsCertStatusError(ssl.cert_status) || + net::IsCertStatusMinorError(ssl.cert_status))) { // There are no major errors. Check for minor errors. - if (net::IsCertStatusMinorError(ssl.cert_status())) { + if (net::IsCertStatusMinorError(ssl.cert_status)) { string16 issuer_name(UTF8ToUTF16(cert->issuer().GetDisplayName())); if (issuer_name.empty()) { issuer_name.assign(l10n_util::GetStringUTF16( @@ -75,17 +78,17 @@ PageInfoModel::PageInfoModel(Profile* profile, IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); description += ASCIIToUTF16("\n\n"); - if (ssl.cert_status() & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) { + if (ssl.cert_status & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) { description += l10n_util::GetStringUTF16( IDS_PAGE_INFO_SECURITY_TAB_UNABLE_TO_CHECK_REVOCATION); - } else if (ssl.cert_status() & net::CERT_STATUS_NO_REVOCATION_MECHANISM) { + } else if (ssl.cert_status & net::CERT_STATUS_NO_REVOCATION_MECHANISM) { description += l10n_util::GetStringUTF16( IDS_PAGE_INFO_SECURITY_TAB_NO_REVOCATION_MECHANISM); } else { NOTREACHED() << "Need to specify string for this warning"; } icon_id = ICON_STATE_WARNING_MINOR; - } else if (ssl.cert_status() & net::CERT_STATUS_IS_EV) { + } else if (ssl.cert_status & net::CERT_STATUS_IS_EV) { // EV HTTPS page. DCHECK(!cert->subject().organization_names.empty()); headline = @@ -115,7 +118,7 @@ PageInfoModel::PageInfoModel(Profile* profile, UTF8ToUTF16(cert->subject().organization_names[0]), locality, UTF8ToUTF16(cert->issuer().GetDisplayName()))); - } else if (ssl.cert_status() & net::CERT_STATUS_IS_DNSSEC) { + } else if (ssl.cert_status & net::CERT_STATUS_IS_DNSSEC) { // DNSSEC authenticated page. if (empty_subject_name) headline.clear(); // Don't display any title. @@ -141,19 +144,19 @@ PageInfoModel::PageInfoModel(Profile* profile, // HTTP or HTTPS with errors (not warnings). description.assign(l10n_util::GetStringUTF16( IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)); - icon_id = ssl.security_style() == content::SECURITY_STYLE_UNAUTHENTICATED ? + icon_id = ssl.security_style == content::SECURITY_STYLE_UNAUTHENTICATED ? ICON_STATE_WARNING_MAJOR : ICON_STATE_ERROR; const string16 bullet = UTF8ToUTF16("\n • "); std::vector<SSLErrorInfo> errors; - SSLErrorInfo::GetErrorsForCertStatus(ssl.cert_id(), ssl.cert_status(), + SSLErrorInfo::GetErrorsForCertStatus(ssl.cert_id, ssl.cert_status, url, &errors); for (size_t i = 0; i < errors.size(); ++i) { description += bullet; description += errors[i].short_description(); } - if (ssl.cert_status() & net::CERT_STATUS_NON_UNIQUE_NAME) { + if (ssl.cert_status & net::CERT_STATUS_NON_UNIQUE_NAME) { description += ASCIIToUTF16("\n\n"); description += l10n_util::GetStringUTF16( IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); @@ -172,24 +175,24 @@ PageInfoModel::PageInfoModel(Profile* profile, icon_id = ICON_STATE_OK; headline.clear(); description.clear(); - if (!ssl.cert_id()) { + if (!ssl.cert_id) { // Not HTTPS. - DCHECK_EQ(ssl.security_style(), content::SECURITY_STYLE_UNAUTHENTICATED); - icon_id = ssl.security_style() == content::SECURITY_STYLE_UNAUTHENTICATED ? + DCHECK_EQ(ssl.security_style, content::SECURITY_STYLE_UNAUTHENTICATED); + icon_id = ssl.security_style == content::SECURITY_STYLE_UNAUTHENTICATED ? ICON_STATE_WARNING_MAJOR : ICON_STATE_ERROR; description.assign(l10n_util::GetStringFUTF16( IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, subject_name)); - } else if (ssl.security_bits() < 0) { + } else if (ssl.security_bits < 0) { // Security strength is unknown. Say nothing. icon_id = ICON_STATE_ERROR; - } else if (ssl.security_bits() == 0) { - DCHECK_NE(ssl.security_style(), content::SECURITY_STYLE_UNAUTHENTICATED); + } else if (ssl.security_bits == 0) { + DCHECK_NE(ssl.security_style, content::SECURITY_STYLE_UNAUTHENTICATED); icon_id = ICON_STATE_ERROR; description.assign(l10n_util::GetStringFUTF16( IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, subject_name)); - } else if (ssl.security_bits() < 80) { + } else if (ssl.security_bits < 80) { icon_id = ICON_STATE_ERROR; description.assign(l10n_util::GetStringFUTF16( IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT, @@ -198,24 +201,26 @@ PageInfoModel::PageInfoModel(Profile* profile, description.assign(l10n_util::GetStringFUTF16( IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT, subject_name, - base::IntToString16(ssl.security_bits()))); - if (ssl.displayed_insecure_content() || ssl.ran_insecure_content()) { - icon_id = ssl.ran_insecure_content() ? + base::IntToString16(ssl.security_bits))); + if (ssl.content_status) { + bool ran_insecure_content = + !!(ssl.content_status & SSLStatus::RAN_INSECURE_CONTENT); + icon_id = ran_insecure_content ? ICON_STATE_ERROR : ICON_STATE_WARNING_MINOR; description.assign(l10n_util::GetStringFUTF16( IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, description, - l10n_util::GetStringUTF16(ssl.ran_insecure_content() ? + l10n_util::GetStringUTF16(ran_insecure_content ? IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR : IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING))); } } uint16 cipher_suite = - net::SSLConnectionStatusToCipherSuite(ssl.connection_status()); - if (ssl.security_bits() > 0 && cipher_suite) { + net::SSLConnectionStatusToCipherSuite(ssl.connection_status); + if (ssl.security_bits > 0 && cipher_suite) { int ssl_version = - net::SSLConnectionStatusToVersion(ssl.connection_status()); + net::SSLConnectionStatusToVersion(ssl.connection_status); const char* ssl_version_str; net::SSLVersionToString(&ssl_version_str, ssl_version); description += ASCIIToUTF16("\n\n"); @@ -223,10 +228,10 @@ PageInfoModel::PageInfoModel(Profile* profile, IDS_PAGE_INFO_SECURITY_TAB_SSL_VERSION, ASCIIToUTF16(ssl_version_str)); - bool did_fallback = (ssl.connection_status() & + bool did_fallback = (ssl.connection_status & net::SSL_CONNECTION_SSL3_FALLBACK) != 0; bool no_renegotiation = - (ssl.connection_status() & + (ssl.connection_status & net::SSL_CONNECTION_NO_RENEGOTIATION_EXTENSION) != 0; const char *key_exchange, *cipher, *mac; net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, cipher_suite); @@ -238,7 +243,7 @@ PageInfoModel::PageInfoModel(Profile* profile, description += ASCIIToUTF16("\n\n"); uint8 compression_id = - net::SSLConnectionStatusToCompression(ssl.connection_status()); + net::SSLConnectionStatusToCompression(ssl.connection_status); if (compression_id) { const char* compression; net::SSLCompressionToString(&compression, compression_id); diff --git a/chrome/browser/page_info_model.h b/chrome/browser/page_info_model.h index dd3897c..9ddaa14 100644 --- a/chrome/browser/page_info_model.h +++ b/chrome/browser/page_info_model.h @@ -11,13 +11,16 @@ #include "base/string16.h" #include "chrome/browser/cancelable_request.h" #include "chrome/browser/history/history.h" -#include "content/browser/tab_contents/navigation_entry.h" #include "googleurl/src/gurl.h" #include "ui/gfx/image/image.h" class PageInfoModelObserver; class Profile; +namespace content { +struct SSLStatus; +} + // The model that provides the information that should be displayed in the page // info dialog/bubble. class PageInfoModel { @@ -75,7 +78,7 @@ class PageInfoModel { PageInfoModel(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history, PageInfoModelObserver* observer); ~PageInfoModel(); diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc index 74cc7e2..e919a61 100644 --- a/chrome/browser/printing/print_dialog_cloud.cc +++ b/chrome/browser/printing/print_dialog_cloud.cc @@ -27,6 +27,7 @@ #include "chrome/common/print_messages.h" #include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" #include "content/browser/webui/web_ui.h" diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc index 8b1d905..aad7aa2 100644 --- a/chrome/browser/printing/print_preview_tab_controller.cc +++ b/chrome/browser/printing/print_preview_tab_controller.cc @@ -29,6 +29,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_details.h" diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc index 1425f15..3771571 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor.cc +++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc @@ -21,6 +21,7 @@ #include "chrome/browser/safe_browsing/browser_features.h" #include "chrome/browser/safe_browsing/client_side_detection_service.h" #include "chrome/common/safe_browsing/csd.pb.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" #include "content/public/common/page_transition_types.h" diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc index e0f1109..9b84e59 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host.cc @@ -25,6 +25,7 @@ #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_request_details.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_details.h" diff --git a/chrome/browser/safe_browsing/client_side_detection_host.h b/chrome/browser/safe_browsing/client_side_detection_host.h index 7e445e1..b8937fc 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host.h +++ b/chrome/browser/safe_browsing/client_side_detection_host.h @@ -15,7 +15,6 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/safe_browsing/browser_feature_extractor.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" -#include "content/browser/tab_contents/navigation_controller.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index f1c4e66..50ccefb 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -33,6 +33,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc index 8ada016..1582c88 100644 --- a/chrome/browser/sessions/tab_restore_service.cc +++ b/chrome/browser/sessions/tab_restore_service.cc @@ -28,6 +28,7 @@ #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" using base::Time; diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc index 6698581..05a2afc 100644 --- a/chrome/browser/ssl/ssl_blocking_page.cc +++ b/chrome/browser/ssl/ssl_blocking_page.cc @@ -113,11 +113,11 @@ void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) { int cert_id = CertStore::GetInstance()->StoreCert( ssl_info.cert, tab()->GetRenderProcessHost()->GetID()); - entry->ssl().set_security_style( - content::SECURITY_STYLE_AUTHENTICATION_BROKEN); - entry->ssl().set_cert_id(cert_id); - entry->ssl().set_cert_status(ssl_info.cert_status); - entry->ssl().set_security_bits(ssl_info.security_bits); + entry->GetSSL().security_style = + content::SECURITY_STYLE_AUTHENTICATION_BROKEN; + entry->GetSSL().cert_id = cert_id; + entry->GetSSL().cert_status = ssl_info.cert_status; + entry->GetSSL().security_bits = ssl_info.security_bits; content::NotificationService::current()->Notify( content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, content::Source<NavigationController>(&tab()->GetController()), diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index 1ffbc16..91df1cb 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -22,6 +22,8 @@ #include "net/base/cert_status_flags.h" #include "net/test/test_server.h" +using content::SSLStatus; + const FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data"); class SSLUITest : public InProcessBrowserTest { @@ -51,11 +53,13 @@ class SSLUITest : public InProcessBrowserTest { ASSERT_TRUE(entry); EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->page_type()); EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATED, - entry->ssl().security_style()); - EXPECT_EQ(0U, entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS); + entry->GetSSL().security_style); + EXPECT_EQ(0U, entry->GetSSL().cert_status & net::CERT_STATUS_ALL_ERRORS); EXPECT_EQ(displayed_insecure_content, - entry->ssl().displayed_insecure_content()); - EXPECT_FALSE(entry->ssl().ran_insecure_content()); + !!(entry->GetSSL().content_status & + SSLStatus::DISPLAYED_INSECURE_CONTENT)); + EXPECT_FALSE( + !!(entry->GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT)); } void CheckUnauthenticatedState(TabContents* tab) { @@ -64,10 +68,12 @@ class SSLUITest : public InProcessBrowserTest { ASSERT_TRUE(entry); EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->page_type()); EXPECT_EQ(content::SECURITY_STYLE_UNAUTHENTICATED, - entry->ssl().security_style()); - EXPECT_EQ(0U, entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS); - EXPECT_FALSE(entry->ssl().displayed_insecure_content()); - EXPECT_FALSE(entry->ssl().ran_insecure_content()); + entry->GetSSL().security_style); + EXPECT_EQ(0U, entry->GetSSL().cert_status & net::CERT_STATUS_ALL_ERRORS); + EXPECT_FALSE(!!(entry->GetSSL().content_status & + SSLStatus::DISPLAYED_INSECURE_CONTENT)); + EXPECT_FALSE( + !!(entry->GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT)); } void CheckAuthenticationBrokenState(TabContents* tab, @@ -81,13 +87,16 @@ class SSLUITest : public InProcessBrowserTest { content::PAGE_TYPE_INTERSTITIAL : content::PAGE_TYPE_NORMAL, entry->page_type()); EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATION_BROKEN, - entry->ssl().security_style()); + entry->GetSSL().security_style); // CERT_STATUS_UNABLE_TO_CHECK_REVOCATION doesn't lower the security style // to SECURITY_STYLE_AUTHENTICATION_BROKEN. ASSERT_NE(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION, error); - EXPECT_EQ(error, entry->ssl().cert_status() & net::CERT_STATUS_ALL_ERRORS); - EXPECT_FALSE(entry->ssl().displayed_insecure_content()); - EXPECT_EQ(ran_insecure_content, entry->ssl().ran_insecure_content()); + EXPECT_EQ(error, + entry->GetSSL().cert_status & net::CERT_STATUS_ALL_ERRORS); + EXPECT_FALSE(!!(entry->GetSSL().content_status & + SSLStatus::DISPLAYED_INSECURE_CONTENT)); + EXPECT_EQ(ran_insecure_content, + !!(entry->GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT)); } void CheckWorkerLoadResult(TabContents* tab, bool expectLoaded) { diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc index 44224e8..131236f 100644 --- a/chrome/browser/sync/profile_sync_service_session_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc @@ -42,6 +42,7 @@ #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/profile_mock.h" #include "chrome/test/base/testing_profile.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/tab_contents/language_state.cc b/chrome/browser/tab_contents/language_state.cc index 0b9841e..4cecef1 100644 --- a/chrome/browser/tab_contents/language_state.cc +++ b/chrome/browser/tab_contents/language_state.cc @@ -4,6 +4,7 @@ #include "chrome/browser/tab_contents/language_state.h" +#include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/navigation_details.h" diff --git a/chrome/browser/tab_contents/language_state.h b/chrome/browser/tab_contents/language_state.h index 1335b58..8f2abbb 100644 --- a/chrome/browser/tab_contents/language_state.h +++ b/chrome/browser/tab_contents/language_state.h @@ -9,7 +9,12 @@ #include <string> #include "base/basictypes.h" -#include "content/browser/tab_contents/navigation_controller.h" + +class NavigationController; + +namespace content { +struct LoadCommittedDetails; +} // This class holds the language state of the current page. // There is one LanguageState instance per TabContents. diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index b9fd587..fd9c06b 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -70,6 +70,7 @@ #include "content/public/browser/download_manager.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_service.h" +#include "content/public/browser/ssl_status.h" #include "content/public/browser/user_metrics.h" #include "content/public/common/content_restriction.h" #include "grit/generated_resources.h" @@ -87,6 +88,7 @@ #endif using content::DownloadManager; +using content::SSLStatus; using content::UserMetricsAction; using WebKit::WebContextMenuData; using WebKit::WebMediaPlayerAction; @@ -1565,8 +1567,8 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { NavigationEntry* nav_entry = source_tab_contents_->GetController().GetActiveEntry(); - source_tab_contents_->ShowPageInfo(nav_entry->GetURL(), nav_entry->ssl(), - true); + source_tab_contents_->ShowPageInfo(nav_entry->GetURL(), + nav_entry->GetSSL(), true); break; } @@ -1607,7 +1609,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { case IDC_CONTENT_CONTEXT_VIEWFRAMEINFO: { // Deserialize the SSL info. - NavigationEntry::SSLStatus ssl; + SSLStatus ssl; if (!params_.security_info.empty()) { int cert_id; net::CertStatus cert_status; @@ -1618,10 +1620,10 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { &cert_status, &security_bits, &connection_status); - ssl.set_cert_id(cert_id); - ssl.set_cert_status(cert_status); - ssl.set_security_bits(security_bits); - ssl.set_connection_status(connection_status); + ssl.cert_id = cert_id; + ssl.cert_status = cert_status; + ssl.security_bits = security_bits; + ssl.connection_status = connection_status; } source_tab_contents_->ShowPageInfo(params_.frame_url, ssl, false); // Don't show the history. diff --git a/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc b/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc index e8abb91..58238fe 100644 --- a/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc +++ b/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc @@ -12,6 +12,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" diff --git a/chrome/browser/tabs/pinned_tab_codec.cc b/chrome/browser/tabs/pinned_tab_codec.cc index 2caab3b..c14caaf 100644 --- a/chrome/browser/tabs/pinned_tab_codec.cc +++ b/chrome/browser/tabs/pinned_tab_codec.cc @@ -14,6 +14,7 @@ #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/pref_names.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" typedef BrowserInit::LaunchWithProfile::Tab Tab; diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index 9c8ba6b..7ffd267 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -26,6 +26,7 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/task_manager/task_manager_worker_resource_provider.cc b/chrome/browser/task_manager/task_manager_worker_resource_provider.cc index 5331486..efa7ae3 100644 --- a/chrome/browser/task_manager/task_manager_worker_resource_provider.cc +++ b/chrome/browser/task_manager/task_manager_worker_resource_provider.cc @@ -22,6 +22,7 @@ #include "content/public/browser/notification_types.h" #include "grit/generated_resources.h" #include "grit/theme_resources_standard.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc index fcf5097..d3ccd48 100644 --- a/chrome/browser/translate/options_menu_model.cc +++ b/chrome/browser/translate/options_menu_model.cc @@ -10,6 +10,7 @@ #include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/translate/translate_infobar_delegate.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/web_contents.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc index 1fd2271..c379e10 100644 --- a/chrome/browser/translate/translate_infobar_delegate.cc +++ b/chrome/browser/translate/translate_infobar_delegate.cc @@ -15,6 +15,7 @@ #include "chrome/browser/translate/translate_tab_helper.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/chrome_constants.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/navigation_details.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc index 97415c2..7d5260d 100644 --- a/chrome/browser/translate/translate_manager_browsertest.cc +++ b/chrome/browser/translate/translate_manager_browsertest.cc @@ -26,6 +26,7 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/renderer_host/mock_render_process_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/test_tab_contents.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_details.h" diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc index 256fe25..6e81596 100644 --- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc +++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc @@ -11,6 +11,7 @@ #include "chrome/browser/ui/blocked_content/blocked_content_container.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/web_contents.h" diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 462b638..9c38db6 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -208,6 +208,7 @@ using base::TimeDelta; using content::PluginService; +using content::SSLStatus; using content::UserMetricsAction; using content::WebContents; @@ -3771,7 +3772,7 @@ void Browser::OnStartDownload(TabContents* source, void Browser::ShowPageInfo(content::BrowserContext* browser_context, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { Profile* profile = Profile::FromBrowserContext(browser_context); window()->ShowPageInfo(profile, url, ssl, show_history); diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index d6f9d64..7ef9bc0 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -954,7 +954,7 @@ class Browser : public TabHandlerDelegate, content::DownloadItem* download) OVERRIDE; virtual void ShowPageInfo(content::BrowserContext* browser_context, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) OVERRIDE; virtual void ViewSourceForTab(TabContents* source, const GURL& page_url) OVERRIDE; diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index 7c57661..d571c10 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -44,6 +44,7 @@ #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/interstitial_page.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" @@ -665,7 +666,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NavigationEntry* entry = browser()->GetSelectedTabContents()-> GetController().GetActiveEntry(); - EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec()); + EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); } #if defined(OS_MACOSX) || defined(OS_LINUX) @@ -690,7 +691,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) { GURL expected_favicon_url( ui_test_utils::GetTestUrl(FilePath(FilePath::kCurrentDirectory), FilePath(kIcon))); - EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec()); + EXPECT_EQ(expected_favicon_url.spec(), entry->GetFavicon().url.spec()); } // Makes sure TabClosing is sent when uninstalling an extension that is an app diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h index fcf0ed9..8ef62ac 100644 --- a/chrome/browser/ui/browser_window.h +++ b/chrome/browser/ui/browser_window.h @@ -9,7 +9,6 @@ #include "chrome/browser/ui/bookmarks/bookmark_bar.h" #include "chrome/browser/ui/fullscreen_exit_bubble_type.h" #include "chrome/common/content_settings_types.h" -#include "content/browser/tab_contents/navigation_entry.h" #include "ui/gfx/native_widget_types.h" #include "webkit/glue/window_open_disposition.h" @@ -31,6 +30,7 @@ struct NativeWebKeyboardEvent; namespace content { class WebContents; +struct SSLStatus; } namespace gfx { @@ -273,7 +273,7 @@ class BrowserWindow { // showing how many times that URL has been visited is added to the page info. virtual void ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) = 0; // Shows the app menu (for accessibility). diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h index fdf714f..41afe84 100644 --- a/chrome/browser/ui/cocoa/browser_window_cocoa.h +++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h @@ -98,7 +98,7 @@ class BrowserWindowCocoa : public BrowserWindow, virtual void TabContentsFocused(TabContents* tab_contents) OVERRIDE; virtual void ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) OVERRIDE; virtual void ShowAppMenu() OVERRIDE; virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm index e8170b3..22e75fa 100644 --- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm @@ -50,6 +50,8 @@ #include "ui/base/l10n/l10n_util_mac.h" #include "ui/gfx/rect.h" +using content::SSLStatus; + // Replicate specific 10.7 SDK declarations for building with prior SDKs. #if !defined(MAC_OS_X_VERSION_10_7) || \ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 @@ -461,7 +463,7 @@ void BrowserWindowCocoa::TabContentsFocused(TabContents* tab_contents) { void BrowserWindowCocoa::ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { browser::ShowPageInfoBubble(window(), profile, url, ssl, show_history); } diff --git a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm index 7182749..0632884 100644 --- a/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm +++ b/chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm @@ -18,6 +18,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #import "testing/gtest_mac.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/codec/png_codec.h" namespace { diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm index 72992f0..8c93038 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm +++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm @@ -7,10 +7,12 @@ #include "base/sys_string_conversions.h" #import "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" #include "skia/ext/skia_utils_mac.h" #import "third_party/mozilla/NSPasteboard+Utils.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util_mac.h" // The info-bubble point should look like it points to the bottom of the lock @@ -98,7 +100,7 @@ bool LocationIconDecoration::OnMousePressed(NSRect frame) { NOTREACHED(); return true; } - tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->ssl(), true); + tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true); return true; } diff --git a/chrome/browser/ui/cocoa/page_info_bubble_controller.mm b/chrome/browser/ui/cocoa/page_info_bubble_controller.mm index 5dcb28e..26ee5a5 100644 --- a/chrome/browser/ui/cocoa/page_info_bubble_controller.mm +++ b/chrome/browser/ui/cocoa/page_info_bubble_controller.mm @@ -22,6 +22,7 @@ #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" #include "chrome/common/url_constants.h" #include "content/browser/cert_store.h" +#include "content/public/browser/ssl_status.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" #include "net/base/cert_status_flags.h" @@ -31,6 +32,8 @@ #include "ui/base/l10n/l10n_util_mac.h" #include "ui/gfx/image/image.h" +using content::SSLStatus; + @interface PageInfoBubbleController (Private) - (PageInfoModel*)model; - (NSButton*)certificateButtonWithFrame:(NSRect)frame; @@ -153,7 +156,7 @@ namespace browser { void ShowPageInfoBubble(gfx::NativeWindow parent, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { PageInfoModelBubbleBridge* bridge = new PageInfoModelBubbleBridge(); PageInfoModel* model = @@ -163,7 +166,7 @@ void ShowPageInfoBubble(gfx::NativeWindow parent, modelObserver:bridge parentWindow:parent]; bridge->set_controller(controller); - [controller setCertID:ssl.cert_id()]; + [controller setCertID:ssl.cert_id]; [controller showWindow:nil]; } diff --git a/chrome/browser/ui/constrained_window_tab_helper.cc b/chrome/browser/ui/constrained_window_tab_helper.cc index cdc9f21e..dd02007 100644 --- a/chrome/browser/ui/constrained_window_tab_helper.cc +++ b/chrome/browser/ui/constrained_window_tab_helper.cc @@ -10,6 +10,7 @@ #include "chrome/common/render_messages.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_widget_host_view.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/navigation_details.h" #include "net/base/registry_controlled_domain.h" diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc index 5c2512a..ded53c9 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.cc +++ b/chrome/browser/ui/gtk/browser_window_gtk.cc @@ -102,6 +102,8 @@ #include "ui/gfx/screen.h" #include "ui/gfx/skia_utils_gtk.h" +using content::SSLStatus; + namespace { // The number of milliseconds between loading animation frames. @@ -1070,7 +1072,7 @@ void BrowserWindowGtk::TabContentsFocused(TabContents* tab_contents) { void BrowserWindowGtk::ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { browser::ShowPageInfoBubble(window_, profile, url, ssl, show_history); } diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h index 4e95d87..47558c1 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.h +++ b/chrome/browser/ui/gtk/browser_window_gtk.h @@ -136,7 +136,7 @@ class BrowserWindowGtk : public BrowserWindow, virtual void TabContentsFocused(TabContents* tab_contents) OVERRIDE; virtual void ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) OVERRIDE; virtual void ShowAppMenu() OVERRIDE; virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, diff --git a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc index b23d499..d362dfb 100644 --- a/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc +++ b/chrome/browser/ui/gtk/download/download_started_animation_gtk.cc @@ -4,6 +4,8 @@ #include "chrome/browser/download/download_started_animation.h" +#include <math.h> + #include <gtk/gtk.h> #include "base/message_loop.h" diff --git a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc index 3651103..b9a26b1 100644 --- a/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc +++ b/chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc @@ -21,6 +21,7 @@ #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/gtk/gtk_hig_constants.h" #include "ui/base/gtk/gtk_signal.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc index de7633a..4c36500 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc @@ -53,6 +53,7 @@ #include "chrome/common/extensions/extension_action.h" #include "chrome/common/extensions/extension_resource.h" #include "chrome/common/pref_names.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" #include "grit/generated_resources.h" @@ -1049,7 +1050,7 @@ gboolean LocationBarViewGtk::OnIconReleased(GtkWidget* sender, NOTREACHED(); return FALSE; } - tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->ssl(), true); + tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true); return TRUE; } else if (event->button == 2) { // When the user middle clicks on the location icon, try to open the diff --git a/chrome/browser/ui/gtk/page_info_bubble_gtk.cc b/chrome/browser/ui/gtk/page_info_bubble_gtk.cc index 1c35354..e7c9e4d 100644 --- a/chrome/browser/ui/gtk/page_info_bubble_gtk.cc +++ b/chrome/browser/ui/gtk/page_info_bubble_gtk.cc @@ -21,6 +21,7 @@ #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" #include "chrome/common/url_constants.h" +#include "content/public/browser/ssl_status.h" #include "googleurl/src/gurl.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" @@ -29,6 +30,8 @@ class Profile; +using content::SSLStatus; + namespace { class PageInfoBubbleGtk : public PageInfoModelObserver, @@ -37,7 +40,7 @@ class PageInfoBubbleGtk : public PageInfoModelObserver, PageInfoBubbleGtk(gfx::NativeWindow parent, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history); virtual ~PageInfoBubbleGtk(); @@ -89,12 +92,12 @@ class PageInfoBubbleGtk : public PageInfoModelObserver, PageInfoBubbleGtk::PageInfoBubbleGtk(gfx::NativeWindow parent, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) : ALLOW_THIS_IN_INITIALIZER_LIST(model_(profile, url, ssl, show_history, this)), url_(url), - cert_id_(ssl.cert_id()), + cert_id_(ssl.cert_id), parent_(parent), contents_(NULL), theme_service_(GtkThemeService::GetFrom(profile)), @@ -241,7 +244,7 @@ namespace browser { void ShowPageInfoBubble(gfx::NativeWindow parent, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); } diff --git a/chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc b/chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc index 32ac8b7..1379187 100644 --- a/chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc +++ b/chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc @@ -9,7 +9,6 @@ #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" -#include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_types.h" diff --git a/chrome/browser/ui/login/login_prompt_gtk.cc b/chrome/browser/ui/login/login_prompt_gtk.cc index 462b916..753d74b 100644 --- a/chrome/browser/ui/login/login_prompt_gtk.cc +++ b/chrome/browser/ui/login/login_prompt_gtk.cc @@ -16,7 +16,6 @@ #include "chrome/browser/ui/login/login_model.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" -#include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents_delegate.h" diff --git a/chrome/browser/ui/login/login_prompt_mac.mm b/chrome/browser/ui/login/login_prompt_mac.mm index 92c8f21..b5c7947 100644 --- a/chrome/browser/ui/login/login_prompt_mac.mm +++ b/chrome/browser/ui/login/login_prompt_mac.mm @@ -16,7 +16,6 @@ #include "chrome/browser/ui/login/login_model.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" -#include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/ui/page_info_bubble.h b/chrome/browser/ui/page_info_bubble.h index c1053e0..fe23408 100644 --- a/chrome/browser/ui/page_info_bubble.h +++ b/chrome/browser/ui/page_info_bubble.h @@ -6,18 +6,21 @@ #define CHROME_BROWSER_UI_PAGE_INFO_BUBBLE_H_ #pragma once -#include "content/browser/tab_contents/navigation_entry.h" #include "ui/gfx/native_widget_types.h" class Profile; class GURL; +namespace content { +struct SSLStatus; +} + namespace browser { void ShowPageInfoBubble(gfx::NativeWindow parent, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history); } // namespace browser diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc index 54e33fa..e723deb 100644 --- a/chrome/browser/ui/panels/panel.cc +++ b/chrome/browser/ui/panels/panel.cc @@ -27,6 +27,7 @@ #include "ui/gfx/screen.h" #endif +using content::SSLStatus; using content::WebContents; // static @@ -459,7 +460,7 @@ void Panel::TabContentsFocused(TabContents* tab_contents) { void Panel::ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { NOTIMPLEMENTED(); } diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h index f59ad84..da377f1 100644 --- a/chrome/browser/ui/panels/panel.h +++ b/chrome/browser/ui/panels/panel.h @@ -148,7 +148,7 @@ class Panel : public BrowserWindow, virtual void TabContentsFocused(TabContents* tab_contents) OVERRIDE; virtual void ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) OVERRIDE; virtual void ShowAppMenu() OVERRIDE; virtual bool PreHandleKeyboardEvent( diff --git a/chrome/browser/ui/pdf/pdf_browsertest.cc b/chrome/browser/ui/pdf/pdf_browsertest.cc index 509de30..fa2e0df 100644 --- a/chrome/browser/ui/pdf/pdf_browsertest.cc +++ b/chrome/browser/ui/pdf/pdf_browsertest.cc @@ -19,6 +19,7 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_observer.h" #include "net/test/test_server.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/clipboard/clipboard.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/screen.h" diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc index b9f4529..76eb5fc 100644 --- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc +++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc @@ -11,6 +11,7 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h" #include "chrome/common/render_messages.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/public/browser/web_contents.h" #include "content/public/common/frame_navigate_params.h" @@ -123,7 +124,7 @@ void SearchEngineTabHelper::OnPageHasOSDD( profile->GetTemplateURLFetcher()->ScheduleDownload( keyword, doc_url, - base_entry->favicon().url(), + base_entry->GetFavicon().url, new TemplateURLFetcherUICallbacks(this, web_contents()), provider_type); } @@ -191,7 +192,7 @@ void SearchEngineTabHelper::GenerateKeywordIfNecessary( new_url->add_input_encoding(params.searchable_form_encoding); DCHECK(controller.GetLastCommittedEntry()); const GURL& favicon_url = - controller.GetLastCommittedEntry()->favicon().url(); + controller.GetLastCommittedEntry()->GetFavicon().url; if (favicon_url.is_valid()) { new_url->SetFaviconURL(favicon_url); } else { diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc index 410fd47..056adb9 100644 --- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc +++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc @@ -135,8 +135,8 @@ bool BackForwardMenuModel::GetIconAt(int index, SkBitmap* icon) { IDR_HISTORY_FAVICON); } else { NavigationEntry* entry = GetNavigationEntry(index); - *icon = entry->favicon().bitmap(); - if (!entry->favicon().is_valid() && menu_model_delegate()) { + *icon = entry->GetFavicon().bitmap; + if (!entry->GetFavicon().valid && menu_model_delegate()) { FetchFavicon(entry); } } @@ -271,11 +271,11 @@ void BackForwardMenuModel::OnFavIconDataAvailable( if (gfx::PNGCodec::Decode(favicon.image_data->front(), favicon.image_data->size(), &fav_icon)) { - entry->favicon().set_is_valid(true); - entry->favicon().set_url(favicon.icon_url); + entry->GetFavicon().valid = true; + entry->GetFavicon().url = favicon.icon_url; if (fav_icon.empty()) return; - entry->favicon().set_bitmap(fav_icon); + entry->GetFavicon().bitmap = fav_icon; if (menu_model_delegate()) { menu_model_delegate()->OnIconChanged(model_index); } diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc index 1a0a108..623d0dd 100644 --- a/chrome/browser/ui/toolbar/toolbar_model.cc +++ b/chrome/browser/ui/toolbar/toolbar_model.cc @@ -19,6 +19,7 @@ #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/webui/web_ui.h" +#include "content/public/browser/ssl_status.h" #include "content/public/common/content_constants.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -26,6 +27,8 @@ #include "net/base/net_util.h" #include "ui/base/l10n/l10n_util.h" +using content::SSLStatus; + ToolbarModel::ToolbarModel(Browser* browser) : browser_(browser), input_in_progress_(false) { @@ -100,8 +103,8 @@ ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const { if (!entry) return NONE; - const NavigationEntry::SSLStatus& ssl = entry->ssl(); - switch (ssl.security_style()) { + const SSLStatus& ssl = entry->GetSSL(); + switch (ssl.security_style) { case content::SECURITY_STYLE_UNKNOWN: case content::SECURITY_STYLE_UNAUTHENTICATED: return NONE; @@ -110,14 +113,14 @@ ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const { return SECURITY_ERROR; case content::SECURITY_STYLE_AUTHENTICATED: - if (ssl.displayed_insecure_content()) + if (!!(ssl.content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT)) return SECURITY_WARNING; - if (net::IsCertStatusError(ssl.cert_status())) { - DCHECK(net::IsCertStatusMinorError(ssl.cert_status())); + if (net::IsCertStatusError(ssl.cert_status)) { + DCHECK(net::IsCertStatusMinorError(ssl.cert_status)); return SECURITY_WARNING; } - if ((ssl.cert_status() & net::CERT_STATUS_IS_EV) && - CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), NULL)) + if ((ssl.cert_status & net::CERT_STATUS_IS_EV) && + CertStore::GetInstance()->RetrieveCert(ssl.cert_id, NULL)) return EV_SECURE; return SECURE; @@ -145,7 +148,7 @@ string16 ToolbarModel::GetEVCertName() const { // Note: Navigation controller and active entry are guaranteed non-NULL or // the security level would be NONE. CertStore::GetInstance()->RetrieveCert( - GetNavigationController()->GetVisibleEntry()->ssl().cert_id(), &cert); + GetNavigationController()->GetVisibleEntry()->GetSSL().cert_id, &cert); return GetEVCertName(*cert); } diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc index 743dbcf..a7acc3a 100644 --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc @@ -41,6 +41,7 @@ #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/button_menu_item_model.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/ui/views/browser_dialogs.h b/chrome/browser/ui/views/browser_dialogs.h index 4afb960..d7089d1 100644 --- a/chrome/browser/ui/views/browser_dialogs.h +++ b/chrome/browser/ui/views/browser_dialogs.h @@ -8,7 +8,6 @@ #include <string> -#include "content/browser/tab_contents/navigation_entry.h" #include "ui/gfx/native_widget_types.h" // This file contains functions for running a variety of browser dialogs and @@ -28,6 +27,10 @@ class TabContents; class TabContentsWrapper; class TemplateURL; +namespace content { +struct SSLStatus; +} + namespace gfx { class Size; } @@ -51,7 +54,7 @@ bool IsBookmarkBubbleViewShowing(); void ShowPageInfoBubble(views::View* anchor_view, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history); // Shows the about dialog. See AboutChromeView. diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 41fe555..4726a8f 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -139,6 +139,7 @@ #endif using base::TimeDelta; +using content::SSLStatus; using content::UserMetricsAction; using content::WebContents; using views::ColumnSet; @@ -1175,7 +1176,7 @@ void BrowserView::TabContentsFocused(TabContents* tab_contents) { void BrowserView::ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { browser::ShowPageInfoBubble(GetLocationBarView()->location_icon_view(), profile, url, ssl, show_history); diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index 2982e14..f50cb3d 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h @@ -315,7 +315,7 @@ class BrowserView : public BrowserWindow, virtual void TabContentsFocused(TabContents* source) OVERRIDE; virtual void ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) OVERRIDE; virtual void ShowAppMenu() OVERRIDE; virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, diff --git a/chrome/browser/ui/views/location_bar/click_handler.cc b/chrome/browser/ui/views/location_bar/click_handler.cc index c1d4ab9..11e9bd5 100644 --- a/chrome/browser/ui/views/location_bar/click_handler.cc +++ b/chrome/browser/ui/views/location_bar/click_handler.cc @@ -7,6 +7,7 @@ #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "ui/views/view.h" @@ -31,5 +32,5 @@ void ClickHandler::OnMouseReleased(const views::MouseEvent& event) { NOTREACHED(); return; } - tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->ssl(), true); + tab->ShowPageInfo(nav_entry->GetURL(), nav_entry->GetSSL(), true); } diff --git a/chrome/browser/ui/views/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info_bubble_view.cc index 04d2cd3..cda225f 100644 --- a/chrome/browser/ui/views/page_info_bubble_view.cc +++ b/chrome/browser/ui/views/page_info_bubble_view.cc @@ -15,6 +15,7 @@ #include "chrome/browser/ui/views/window.h" #include "chrome/common/url_constants.h" #include "content/browser/cert_store.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" #include "ui/base/l10n/l10n_util.h" @@ -28,6 +29,8 @@ #include "ui/views/layout/grid_layout.h" #include "ui/views/widget/widget.h" +using content::SSLStatus; + namespace { // Layout constants. @@ -101,12 +104,12 @@ class Section : public views::View, PageInfoBubbleView::PageInfoBubbleView(views::View* anchor_view, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), ALLOW_THIS_IN_INITIALIZER_LIST(model_(profile, url, ssl, show_history, this)), - cert_id_(ssl.cert_id()), + cert_id_(ssl.cert_id), help_center_link_(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(resize_animation_(this)), animation_start_height_(0) { @@ -472,7 +475,7 @@ namespace browser { void ShowPageInfoBubble(views::View* anchor_view, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const SSLStatus& ssl, bool show_history) { PageInfoBubbleView* page_info_bubble = new PageInfoBubbleView(anchor_view, profile, url, ssl, show_history); diff --git a/chrome/browser/ui/views/page_info_bubble_view.h b/chrome/browser/ui/views/page_info_bubble_view.h index 2783451..d84d404 100644 --- a/chrome/browser/ui/views/page_info_bubble_view.h +++ b/chrome/browser/ui/views/page_info_bubble_view.h @@ -13,6 +13,10 @@ #include "ui/views/bubble/bubble_delegate.h" #include "ui/views/controls/link_listener.h" +namespace content { +struct SSLStatus; +} + class PageInfoBubbleView : public views::BubbleDelegateView, public PageInfoModelObserver, public views::LinkListener { @@ -20,7 +24,7 @@ class PageInfoBubbleView : public views::BubbleDelegateView, PageInfoBubbleView(views::View* anchor_view, Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history); virtual ~PageInfoBubbleView(); diff --git a/chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc b/chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc index abcd55d..9193527 100644 --- a/chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc +++ b/chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc @@ -11,7 +11,6 @@ #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" #include "chrome/browser/ui/views/constrained_window_views.h" -#include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc index b494749..88041b22 100644 --- a/chrome/browser/ui/webui/bug_report_ui.cc +++ b/chrome/browser/ui/webui/bug_report_ui.cc @@ -25,6 +25,7 @@ #include "chrome/browser/ui/window_snapshot/window_snapshot.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/url_constants.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "grit/browser_resources.h" diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc index 82a86d5..d38e068 100644 --- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc +++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc @@ -20,6 +20,7 @@ #include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/navigation_controller.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc index b0d433a..69b9288 100644 --- a/chrome/browser/ui/webui/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview_handler.cc @@ -41,6 +41,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/print_messages.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "printing/backend/print_backend.h" diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc index 9a9a067..232f8d0 100644 --- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc @@ -21,6 +21,7 @@ #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" +#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index da5b01d..a85f255 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h @@ -98,7 +98,7 @@ class TestBrowserWindow : public BrowserWindow { virtual void TabContentsFocused(TabContents* tab_contents) OVERRIDE {} virtual void ShowPageInfo(Profile* profile, const GURL& url, - const NavigationEntry::SSLStatus& ssl, + const content::SSLStatus& ssl, bool show_history) OVERRIDE {} virtual void Cut() OVERRIDE {} virtual void Copy() OVERRIDE {} |