summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-27 21:38:17 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-27 21:38:17 +0000
commitd583e3f2463dd1d216c92923e2eb9a9ba6066676 (patch)
treedcb942878d5bd6b548ae28555df88f49cdb988cc
parent4806e850ba4d2fbc633ff2efebef757fbd050a8f (diff)
downloadchromium_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
-rw-r--r--chrome/browser/automation/automation_tab_helper.cc1
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc19
-rw-r--r--chrome/browser/automation/testing_automation_provider.h1
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc1
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc1
-rw-r--r--chrome/browser/debugger/devtools_window.cc4
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc1
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc1
-rw-r--r--chrome/browser/extensions/extension_override_apitest.cc1
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc5
-rw-r--r--chrome/browser/extensions/extension_url_rewrite_browsertest.cc1
-rw-r--r--chrome/browser/extensions/webstore_installer.cc1
-rw-r--r--chrome/browser/external_tab_container_win.cc10
-rw-r--r--chrome/browser/favicon/favicon_handler.cc18
-rw-r--r--chrome/browser/favicon/favicon_handler_unittest.cc46
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc20
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context.cc1
-rw-r--r--chrome/browser/google/google_url_tracker.cc1
-rw-r--r--chrome/browser/instant/instant_loader.cc10
-rw-r--r--chrome/browser/omnibox_search_hint.cc1
-rw-r--r--chrome/browser/page_info_model.cc65
-rw-r--r--chrome/browser/page_info_model.h7
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc1
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc1
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.cc1
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc1
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.h1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc1
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc1
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc10
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc33
-rw-r--r--chrome/browser/sync/profile_sync_service_session_unittest.cc1
-rw-r--r--chrome/browser/tab_contents/language_state.cc1
-rw-r--r--chrome/browser/tab_contents/language_state.h7
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc16
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_browsertest.cc1
-rw-r--r--chrome/browser/tabs/pinned_tab_codec.cc1
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc1
-rw-r--r--chrome/browser/task_manager/task_manager_worker_resource_provider.cc1
-rw-r--r--chrome/browser/translate/options_menu_model.cc1
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.cc1
-rw-r--r--chrome/browser/translate/translate_manager_browsertest.cc1
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc1
-rw-r--r--chrome/browser/ui/browser.cc3
-rw-r--r--chrome/browser/ui/browser.h2
-rw-r--r--chrome/browser/ui/browser_browsertest.cc5
-rw-r--r--chrome/browser/ui/browser_window.h4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.h2
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm4
-rw-r--r--chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm1
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm4
-rw-r--r--chrome/browser/ui/cocoa/page_info_bubble_controller.mm7
-rw-r--r--chrome/browser/ui/constrained_window_tab_helper.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.h2
-rw-r--r--chrome/browser/ui/gtk/download/download_started_animation_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc3
-rw-r--r--chrome/browser/ui/gtk/page_info_bubble_gtk.cc11
-rw-r--r--chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc1
-rw-r--r--chrome/browser/ui/login/login_prompt_gtk.cc1
-rw-r--r--chrome/browser/ui/login/login_prompt_mac.mm1
-rw-r--r--chrome/browser/ui/page_info_bubble.h7
-rw-r--r--chrome/browser/ui/panels/panel.cc3
-rw-r--r--chrome/browser/ui/panels/panel.h2
-rw-r--r--chrome/browser/ui/pdf/pdf_browsertest.cc1
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.cc5
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc10
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.cc19
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc1
-rw-r--r--chrome/browser/ui/views/browser_dialogs.h7
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc3
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h2
-rw-r--r--chrome/browser/ui/views/location_bar/click_handler.cc3
-rw-r--r--chrome/browser/ui/views/page_info_bubble_view.cc9
-rw-r--r--chrome/browser/ui/views/page_info_bubble_view.h6
-rw-r--r--chrome/browser/ui/views/tab_modal_confirm_dialog_views.cc1
-rw-r--r--chrome/browser/ui/webui/bug_report_ui.cc1
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc1
-rw-r--r--chrome/browser/ui/webui/print_preview_handler.cc1
-rw-r--r--chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc1
-rw-r--r--chrome/test/base/test_browser_window.h2
-rw-r--r--content/browser/debugger/devtools_http_handler_impl.cc3
-rw-r--r--content/browser/download/save_package.cc1
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc1
-rw-r--r--content/browser/ssl/ssl_manager.cc20
-rw-r--r--content/browser/ssl/ssl_policy.cc34
-rw-r--r--content/browser/tab_contents/navigation_entry.cc35
-rw-r--r--content/browser/tab_contents/navigation_entry.h177
-rw-r--r--content/browser/tab_contents/navigation_entry_unittest.cc52
-rw-r--r--content/browser/tab_contents/tab_contents.cc3
-rw-r--r--content/browser/tab_contents/tab_contents.h2
-rw-r--r--content/browser/tab_contents/test_tab_contents.cc1
-rw-r--r--content/browser/tab_contents/web_drag_source_gtk.cc1
-rw-r--r--content/content_browser.gypi4
-rw-r--r--content/public/browser/DEPS1
-rw-r--r--content/public/browser/favicon_status.cc15
-rw-r--r--content/public/browser/favicon_status.h37
-rw-r--r--content/public/browser/navigation_entry.h11
-rw-r--r--content/public/browser/ssl_status.cc18
-rw-r--r--content/public/browser/ssl_status.h63
-rw-r--r--content/public/browser/web_contents.h4
-rw-r--r--content/public/browser/web_contents_delegate.h5
-rw-r--r--content/shell/shell_mac.mm1
104 files changed, 509 insertions, 423 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 {}
diff --git a/content/browser/debugger/devtools_http_handler_impl.cc b/content/browser/debugger/devtools_http_handler_impl.cc
index 73a9e67..af6518d 100644
--- a/content/browser/debugger/devtools_http_handler_impl.cc
+++ b/content/browser/debugger/devtools_http_handler_impl.cc
@@ -17,6 +17,7 @@
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/devtools_messages.h"
#include "content/public/browser/browser_thread.h"
@@ -297,7 +298,7 @@ static PageList GeneratePageList(
page_info.url = entry->GetURL().spec();
page_info.title = UTF16ToUTF8(net::EscapeForHTML(entry->GetTitle()));
page_info.thumbnail_url = "/thumb/" + entry->GetURL().spec();
- page_info.favicon_url = entry->favicon().url().spec();
+ page_info.favicon_url = entry->GetFavicon().url.spec();
page_list.push_back(page_info);
}
return page_list;
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 980e927..f09c5d0 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -28,6 +28,7 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/resource_context.h"
+#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h"
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index 269c730..8a6968b 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -8,6 +8,7 @@
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/dom_storage_common.h"
#include "content/common/view_messages.h"
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index 6544ffff..250f64c 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -16,13 +16,15 @@
#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"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/ssl_status.h"
#include "net/base/cert_status_flags.h"
using content::BrowserThread;
+using content::SSLStatus;
using content::WebContents;
// static
@@ -145,11 +147,11 @@ void SSLManager::DidCommitProvisionalLoad(
// We may not have an entry if this is a navigation to an initial blank
// page. Reset the SSL information and add the new data we have.
- entry->ssl() = NavigationEntry::SSLStatus();
- entry->ssl().set_cert_id(ssl_cert_id);
- entry->ssl().set_cert_status(ssl_cert_status);
- entry->ssl().set_security_bits(ssl_security_bits);
- entry->ssl().set_connection_status(ssl_connection_status);
+ entry->GetSSL() = SSLStatus();
+ entry->GetSSL().cert_id = ssl_cert_id;
+ entry->GetSSL().cert_status = ssl_cert_status;
+ entry->GetSSL().security_bits = ssl_security_bits;
+ entry->GetSSL().connection_status = ssl_connection_status;
}
}
@@ -168,7 +170,7 @@ bool SSLManager::ProcessedSSLErrorFromRequest() const {
return false;
}
- return net::IsCertStatusError(entry->ssl().cert_status());
+ return net::IsCertStatusError(entry->GetSSL().cert_status);
}
void SSLManager::Observe(int type,
@@ -248,11 +250,11 @@ void SSLManager::UpdateEntry(NavigationEntry* entry) {
if (!entry)
return;
- NavigationEntry::SSLStatus original_ssl_status = entry->ssl(); // Copy!
+ SSLStatus original_ssl_status = entry->GetSSL(); // Copy!
policy()->UpdateEntry(entry, controller_->tab_contents());
- if (!entry->ssl().Equals(original_ssl_status)) {
+ if (!entry->GetSSL().Equals(original_ssl_status)) {
content::NotificationService::current()->Notify(
content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
content::Source<NavigationController>(controller_),
diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc
index 86a4585..57acc78 100644
--- a/content/browser/ssl/ssl_policy.cc
+++ b/content/browser/ssl/ssl_policy.cc
@@ -18,11 +18,14 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/ssl_status.h"
#include "content/public/common/url_constants.h"
#include "net/base/cert_status_flags.h"
#include "net/base/ssl_info.h"
#include "webkit/glue/resource_type.h"
+using content::SSLStatus;
+
namespace {
static const char kDot = '.';
@@ -116,26 +119,25 @@ void SSLPolicy::UpdateEntry(NavigationEntry* entry, TabContents* tab_contents) {
// An HTTPS response may not have a certificate for some reason. When that
// happens, use the unauthenticated (HTTP) rather than the authentication
// broken security style so that we can detect this error condition.
- if (!entry->ssl().cert_id()) {
- entry->ssl().set_security_style(content::SECURITY_STYLE_UNAUTHENTICATED);
+ if (!entry->GetSSL().cert_id) {
+ entry->GetSSL().security_style = content::SECURITY_STYLE_UNAUTHENTICATED;
return;
}
- if (!(entry->ssl().cert_status() & net::CERT_STATUS_COMMON_NAME_INVALID)) {
+ if (!(entry->GetSSL().cert_status & net::CERT_STATUS_COMMON_NAME_INVALID)) {
// CAs issue certificates for intranet hosts to everyone. Therefore, we
// mark intranet hosts as being non-unique.
if (IsIntranetHost(entry->GetURL().host())) {
- entry->ssl().set_cert_status(entry->ssl().cert_status() |
- net::CERT_STATUS_NON_UNIQUE_NAME);
+ entry->GetSSL().cert_status |= net::CERT_STATUS_NON_UNIQUE_NAME;
}
}
- if (net::IsCertStatusError(entry->ssl().cert_status())) {
+ if (net::IsCertStatusError(entry->GetSSL().cert_status)) {
// Minor errors don't lower the security style to
// SECURITY_STYLE_AUTHENTICATION_BROKEN.
- if (!net::IsCertStatusMinorError(entry->ssl().cert_status())) {
- entry->ssl().set_security_style(
- content::SECURITY_STYLE_AUTHENTICATION_BROKEN);
+ if (!net::IsCertStatusMinorError(entry->GetSSL().cert_status)) {
+ entry->GetSSL().security_style =
+ content::SECURITY_STYLE_AUTHENTICATION_BROKEN;
}
return;
}
@@ -147,14 +149,14 @@ void SSLPolicy::UpdateEntry(NavigationEntry* entry, TabContents* tab_contents) {
if (site_instance &&
backend_->DidHostRunInsecureContent(
entry->GetURL().host(), site_instance->GetProcess()->GetID())) {
- entry->ssl().set_security_style(
- content::SECURITY_STYLE_AUTHENTICATION_BROKEN);
- entry->ssl().set_ran_insecure_content();
+ entry->GetSSL().security_style =
+ content::SECURITY_STYLE_AUTHENTICATION_BROKEN;
+ entry->GetSSL().content_status |= SSLStatus::RAN_INSECURE_CONTENT;
return;
}
if (tab_contents->DisplayedInsecureContent())
- entry->ssl().set_displayed_insecure_content();
+ entry->GetSSL().content_status |= SSLStatus::DISPLAYED_INSECURE_CONTENT;
}
void SSLPolicy::OnAllowCertificate(SSLCertErrorHandler* handler, bool allow) {
@@ -205,12 +207,12 @@ void SSLPolicy::OnCertErrorInternal(SSLCertErrorHandler* handler,
}
void SSLPolicy::InitializeEntryIfNeeded(NavigationEntry* entry) {
- if (entry->ssl().security_style() != content::SECURITY_STYLE_UNKNOWN)
+ if (entry->GetSSL().security_style != content::SECURITY_STYLE_UNKNOWN)
return;
- entry->ssl().set_security_style(entry->GetURL().SchemeIsSecure() ?
+ entry->GetSSL().security_style = entry->GetURL().SchemeIsSecure() ?
content::SECURITY_STYLE_AUTHENTICATED :
- content::SECURITY_STYLE_UNAUTHENTICATED);
+ content::SECURITY_STYLE_UNAUTHENTICATED;
}
void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
diff --git a/content/browser/tab_contents/navigation_entry.cc b/content/browser/tab_contents/navigation_entry.cc
index 1247c09b..59e6e83 100644
--- a/content/browser/tab_contents/navigation_entry.cc
+++ b/content/browser/tab_contents/navigation_entry.cc
@@ -7,12 +7,14 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "content/browser/site_instance.h"
-#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/url_constants.h"
#include "net/base/net_util.h"
#include "ui/base/text/text_elider.h"
+using content::FaviconStatus;
+using content::SSLStatus;
+
// Use this to get a new unique ID for a NavigationEntry during construction.
// The returned ID is guaranteed to be nonzero (which is the "no ID" indicator).
static int GetUniqueIDInConstructor() {
@@ -20,20 +22,11 @@ static int GetUniqueIDInConstructor() {
return ++unique_id_counter;
}
-NavigationEntry::SSLStatus::SSLStatus()
- : security_style_(content::SECURITY_STYLE_UNKNOWN),
- cert_id_(0),
- cert_status_(0),
- security_bits_(-1),
- connection_status_(0),
- content_status_(NORMAL_CONTENT) {
-}
-
-NavigationEntry::FaviconStatus::FaviconStatus() : valid_(false) {
- bitmap_ = *content::GetContentClient()->browser()->GetDefaultFavicon();
+NavigationEntry* NavigationEntry::FromNavigationEntry(
+ content::NavigationEntry* entry) {
+ return static_cast<NavigationEntry*>(entry);
}
-
NavigationEntry::NavigationEntry()
: unique_id_(GetUniqueIDInConstructor()),
site_instance_(NULL),
@@ -166,3 +159,19 @@ void NavigationEntry::SetHasPostData(bool has_post_data) {
bool NavigationEntry::GetHasPostData() const {
return has_post_data_;
}
+
+const FaviconStatus& NavigationEntry::GetFavicon() const {
+ return favicon_;
+}
+
+FaviconStatus& NavigationEntry::GetFavicon() {
+ return favicon_;
+}
+
+const SSLStatus& NavigationEntry::GetSSL() const {
+ return ssl_;
+}
+
+SSLStatus& NavigationEntry::GetSSL() {
+ return ssl_;
+}
diff --git a/content/browser/tab_contents/navigation_entry.h b/content/browser/tab_contents/navigation_entry.h
index 27ca050..f20c047 100644
--- a/content/browser/tab_contents/navigation_entry.h
+++ b/content/browser/tab_contents/navigation_entry.h
@@ -11,165 +11,18 @@
#include "base/memory/ref_counted.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/common/content_export.h"
+#include "content/public/browser/favicon_status.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/ssl_status.h"
#include "content/public/common/page_type.h"
-#include "content/public/common/security_style.h"
-#include "googleurl/src/gurl.h"
-#include "net/base/cert_status_flags.h"
-#include "third_party/skia/include/core/SkBitmap.h"
class SiteInstance;
class CONTENT_EXPORT NavigationEntry
: public NON_EXPORTED_BASE(content::NavigationEntry) {
public:
- // SSL -----------------------------------------------------------------------
-
- // Collects the SSL information for this NavigationEntry.
- class SSLStatus {
- public:
- // Flags used for the page security content status.
- enum ContentStatusFlags {
- // HTTP page, or HTTPS page with no insecure content.
- NORMAL_CONTENT = 0,
-
- // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
- DISPLAYED_INSECURE_CONTENT = 1 << 0,
-
- // HTTPS page containing "executed" HTTP resources (i.e. script).
- // Also currently used for HTTPS page containing broken-HTTPS resources;
- // this is wrong and should be fixed (see comments in
- // SSLPolicy::OnRequestStarted()).
- RAN_INSECURE_CONTENT = 1 << 1,
- };
-
- CONTENT_EXPORT SSLStatus();
-
- bool Equals(const SSLStatus& status) const {
- return security_style_ == status.security_style_ &&
- cert_id_ == status.cert_id_ &&
- cert_status_ == status.cert_status_ &&
- security_bits_ == status.security_bits_ &&
- content_status_ == status.content_status_;
- }
-
- void set_security_style(content::SecurityStyle security_style) {
- security_style_ = security_style;
- }
- content::SecurityStyle security_style() const {
- return security_style_;
- }
-
- void set_cert_id(int ssl_cert_id) {
- cert_id_ = ssl_cert_id;
- }
- int cert_id() const {
- return cert_id_;
- }
-
- void set_cert_status(net::CertStatus ssl_cert_status) {
- cert_status_ = ssl_cert_status;
- }
- net::CertStatus cert_status() const {
- return cert_status_;
- }
-
- void set_security_bits(int security_bits) {
- security_bits_ = security_bits;
- }
- int security_bits() const {
- return security_bits_;
- }
-
- void set_displayed_insecure_content() {
- content_status_ |= DISPLAYED_INSECURE_CONTENT;
- }
- bool displayed_insecure_content() const {
- return (content_status_ & DISPLAYED_INSECURE_CONTENT) != 0;
- }
-
- void set_ran_insecure_content() {
- content_status_ |= RAN_INSECURE_CONTENT;
- }
- bool ran_insecure_content() const {
- return (content_status_ & RAN_INSECURE_CONTENT) != 0;
- }
-
- void set_connection_status(int connection_status) {
- connection_status_ = connection_status;
- }
- int connection_status() const {
- return connection_status_;
- }
-
- // Raw accessors for all the content status flags. This contains a
- // combination of any of the ContentStatusFlags defined above. It is used
- // by some tests for checking and for certain copying. Use the per-status
- // functions for normal usage.
- void set_content_status(int content_status) {
- content_status_ = content_status;
- }
- int content_status() const {
- return content_status_;
- }
-
- private:
- // See the accessors above for descriptions.
- content::SecurityStyle security_style_;
- int cert_id_;
- net::CertStatus cert_status_;
- int security_bits_;
- int connection_status_;
- int content_status_;
-
- // Copy and assignment is explicitly allowed for this class.
- };
-
- // Favicon -------------------------------------------------------------------
-
- // Collects the favicon related information for a NavigationEntry.
- class FaviconStatus {
- public:
- FaviconStatus();
-
- // Indicates whether we've gotten an official favicon for the page, or are
- // just using the default favicon.
- void set_is_valid(bool is_valid) {
- valid_ = is_valid;
- }
- bool is_valid() const {
- return valid_;
- }
-
- // The URL of the favicon which was used to load it off the web.
- void set_url(const GURL& favicon_url) {
- url_ = favicon_url;
- }
- const GURL& url() const {
- return url_;
- }
-
- // The favicon bitmap for the page. If the favicon has not been explicitly
- // set or it empty, it will return the default favicon. Note that this is
- // loaded asynchronously, so even if the favicon URL is valid we may return
- // the default favicon if we haven't gotten the data yet.
- void set_bitmap(const SkBitmap& bitmap) {
- bitmap_ = bitmap;
- }
- const SkBitmap& bitmap() const {
- return bitmap_;
- }
-
- private:
- // See the accessors above for descriptions.
- bool valid_;
- GURL url_;
- SkBitmap bitmap_;
-
- // Copy and assignment is explicitly allowed for this class.
- };
- // ---------------------------------------------------------------------------
+ NavigationEntry* FromNavigationEntry(content::NavigationEntry* entry);
NavigationEntry();
NavigationEntry(SiteInstance* instance,
@@ -199,6 +52,10 @@ class CONTENT_EXPORT NavigationEntry
virtual content::PageTransition GetTransitionType() const OVERRIDE;
virtual void SetHasPostData(bool has_post_data) OVERRIDE;
virtual bool GetHasPostData() const OVERRIDE;
+ virtual const content::FaviconStatus& GetFavicon() const OVERRIDE;
+ virtual content::FaviconStatus& GetFavicon() OVERRIDE;
+ virtual const content::SSLStatus& GetSSL() const OVERRIDE;
+ virtual content::SSLStatus& GetSSL() OVERRIDE;
void set_unique_id(int unique_id) {
unique_id_ = unique_id;
@@ -249,22 +106,6 @@ class CONTENT_EXPORT NavigationEntry
update_virtual_url_with_url_ = update;
}
- // The favicon data and tracking information. See FaviconStatus above.
- const FaviconStatus& favicon() const {
- return favicon_;
- }
- FaviconStatus& favicon() {
- return favicon_;
- }
-
- // All the SSL flags and state. See SSLStatus above.
- const SSLStatus& ssl() const {
- return ssl_;
- }
- SSLStatus& ssl() {
- return ssl_;
- }
-
// Extra headers (separated by \n) to send during the request.
void set_extra_headers(const std::string& extra_headers) {
extra_headers_ = extra_headers;
@@ -345,10 +186,10 @@ class CONTENT_EXPORT NavigationEntry
GURL virtual_url_;
bool update_virtual_url_with_url_;
string16 title_;
- FaviconStatus favicon_;
+ content::FaviconStatus favicon_;
std::string content_state_;
int32 page_id_;
- SSLStatus ssl_;
+ content::SSLStatus ssl_;
content::PageTransition transition_type_;
GURL user_typed_url_;
bool has_post_data_;
diff --git a/content/browser/tab_contents/navigation_entry_unittest.cc b/content/browser/tab_contents/navigation_entry_unittest.cc
index 061729f..0eb4ade 100644
--- a/content/browser/tab_contents/navigation_entry_unittest.cc
+++ b/content/browser/tab_contents/navigation_entry_unittest.cc
@@ -7,8 +7,11 @@
#include "base/utf_string_conversions.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/navigation_entry.h"
+#include "content/public/browser/ssl_status.h"
#include "testing/gtest/include/gtest/gtest.h"
+using content::SSLStatus;
+
class NavigationEntryTest : public testing::Test {
public:
NavigationEntryTest() : instance_(NULL) {
@@ -89,52 +92,25 @@ TEST_F(NavigationEntryTest, NavigationEntryURLs) {
EXPECT_EQ(GURL("typedurl"), entry2_.get()->user_typed_url());
}
-// Test Favicon inner class
+// Test Favicon inner class construction.
TEST_F(NavigationEntryTest, NavigationEntryFavicons) {
- EXPECT_EQ(GURL(), entry1_.get()->favicon().url());
- entry1_.get()->favicon().set_url(GURL("icon"));
- EXPECT_EQ(GURL("icon"), entry1_.get()->favicon().url());
-
- // Validity not affected by setting URL
- EXPECT_FALSE(entry1_.get()->favicon().is_valid());
- entry1_.get()->favicon().set_is_valid(true);
- EXPECT_TRUE(entry1_.get()->favicon().is_valid());
+ EXPECT_EQ(GURL(), entry1_.get()->GetFavicon().url);
+ EXPECT_FALSE(entry1_.get()->GetFavicon().valid);
}
// Test SSLStatus inner class
TEST_F(NavigationEntryTest, NavigationEntrySSLStatus) {
// Default (unknown)
EXPECT_EQ(content::SECURITY_STYLE_UNKNOWN,
- entry1_.get()->ssl().security_style());
+ entry1_.get()->GetSSL().security_style);
EXPECT_EQ(content::SECURITY_STYLE_UNKNOWN,
- entry2_.get()->ssl().security_style());
- EXPECT_EQ(0, entry1_.get()->ssl().cert_id());
- EXPECT_EQ(0U, entry1_.get()->ssl().cert_status());
- EXPECT_EQ(-1, entry1_.get()->ssl().security_bits());
- EXPECT_FALSE(entry1_.get()->ssl().displayed_insecure_content());
- EXPECT_FALSE(entry1_.get()->ssl().ran_insecure_content());
-
- // Change from the defaults
- entry2_.get()->ssl().set_security_style(
- content::SECURITY_STYLE_AUTHENTICATED);
- entry2_.get()->ssl().set_cert_id(4);
- entry2_.get()->ssl().set_cert_status(net::CERT_STATUS_COMMON_NAME_INVALID);
- entry2_.get()->ssl().set_security_bits(0);
- entry2_.get()->ssl().set_displayed_insecure_content();
- EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATED,
- entry2_.get()->ssl().security_style());
- EXPECT_EQ(4, entry2_.get()->ssl().cert_id());
- EXPECT_EQ(net::CERT_STATUS_COMMON_NAME_INVALID,
- entry2_.get()->ssl().cert_status());
- EXPECT_EQ(0, entry2_.get()->ssl().security_bits());
- EXPECT_TRUE(entry2_.get()->ssl().displayed_insecure_content());
-
- entry2_.get()->ssl().set_security_style(
- content::SECURITY_STYLE_AUTHENTICATION_BROKEN);
- entry2_.get()->ssl().set_ran_insecure_content();
- EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATION_BROKEN,
- entry2_.get()->ssl().security_style());
- EXPECT_TRUE(entry2_.get()->ssl().ran_insecure_content());
+ entry2_.get()->GetSSL().security_style);
+ EXPECT_EQ(0, entry1_.get()->GetSSL().cert_id);
+ EXPECT_EQ(0U, entry1_.get()->GetSSL().cert_status);
+ EXPECT_EQ(-1, entry1_.get()->GetSSL().security_bits);
+ int content_status = entry1_.get()->GetSSL().content_status;
+ EXPECT_FALSE(!!(content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT));
+ EXPECT_FALSE(!!(content_status & SSLStatus::RAN_INSECURE_CONTENT));
}
// Test other basic accessors
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 4a440df..3330a24 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -111,6 +111,7 @@ using content::DevToolsAgentHostRegistry;
using content::DevToolsManagerImpl;
using content::DownloadItem;
using content::DownloadManager;
+using content::SSLStatus;
using content::UserMetricsAction;
using content::WebContents;
using content::WebContentsObserver;
@@ -642,7 +643,7 @@ TabContents* TabContents::Clone() {
}
void TabContents::ShowPageInfo(const GURL& url,
- const NavigationEntry::SSLStatus& ssl,
+ const SSLStatus& ssl,
bool show_history) {
if (!delegate_)
return;
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index c26c3f4..d23024d 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -165,7 +165,7 @@ class CONTENT_EXPORT TabContents
virtual void Stop() OVERRIDE;
virtual TabContents* Clone() OVERRIDE;
virtual void ShowPageInfo(const GURL& url,
- const NavigationEntry::SSLStatus& ssl,
+ const content::SSLStatus& ssl,
bool show_history) OVERRIDE;
virtual void AddNewContents(TabContents* new_contents,
WindowOpenDisposition disposition,
diff --git a/content/browser/tab_contents/test_tab_contents.cc b/content/browser/tab_contents/test_tab_contents.cc
index a63ceb5..7ec09ba 100644
--- a/content/browser/tab_contents/test_tab_contents.cc
+++ b/content/browser/tab_contents/test_tab_contents.cc
@@ -11,6 +11,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/site_instance.h"
+#include "content/browser/tab_contents/navigation_entry.h"
#include "content/common/view_messages.h"
#include "content/public/common/page_transition_types.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/content/browser/tab_contents/web_drag_source_gtk.cc b/content/browser/tab_contents/web_drag_source_gtk.cc
index d78990c..00f738b 100644
--- a/content/browser/tab_contents/web_drag_source_gtk.cc
+++ b/content/browser/tab_contents/web_drag_source_gtk.cc
@@ -20,6 +20,7 @@
#include "content/public/browser/content_browser_client.h"
#include "net/base/file_stream.h"
#include "net/base/net_util.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
#include "ui/base/gtk/gtk_compat.h"
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index 6e91bfa..0305e7e 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -47,6 +47,8 @@
'public/browser/download_item.h',
'public/browser/download_manager.h',
'public/browser/download_manager_delegate.h',
+ 'public/browser/favicon_status.cc',
+ 'public/browser/favicon_status.h',
'public/browser/native_web_keyboard_event.h',
'public/browser/navigation_details.cc',
'public/browser/navigation_details.h',
@@ -70,6 +72,8 @@
'public/browser/resource_dispatcher_host_delegate.h',
'public/browser/sensors.h',
'public/browser/sensors_listener.h',
+ 'public/browser/ssl_status.cc',
+ 'public/browser/ssl_status.h',
'public/browser/user_metrics.h',
'public/browser/web_contents.h',
'public/browser/web_contents_delegate.cc',
diff --git a/content/public/browser/DEPS b/content/public/browser/DEPS
index ae8cc61..8302958 100644
--- a/content/public/browser/DEPS
+++ b/content/public/browser/DEPS
@@ -8,7 +8,6 @@ include_rules = [
"+content/browser/download/interrupt_reasons.h",
"+content/browser/javascript_dialogs.h",
"+content/browser/tab_contents/navigation_controller.h",
- "+content/browser/tab_contents/navigation_entry.h",
"+content/browser/tab_contents/page_navigator.h",
"+content/browser/tab_contents/tab_contents.h",
"+content/browser/webui/web_ui.h",
diff --git a/content/public/browser/favicon_status.cc b/content/public/browser/favicon_status.cc
new file mode 100644
index 0000000..2ab0e8a
--- /dev/null
+++ b/content/public/browser/favicon_status.cc
@@ -0,0 +1,15 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/browser/favicon_status.h"
+
+#include "content/public/browser/content_browser_client.h"
+
+namespace content {
+
+FaviconStatus::FaviconStatus() : valid(false) {
+ bitmap = *GetContentClient()->browser()->GetDefaultFavicon();
+}
+
+} // namespace content
diff --git a/content/public/browser/favicon_status.h b/content/public/browser/favicon_status.h
new file mode 100644
index 0000000..088ce7c
--- /dev/null
+++ b/content/public/browser/favicon_status.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_FAVICON_STATUS_H_
+#define CONTENT_PUBLIC_BROWSER_FAVICON_STATUS_H_
+#pragma once
+
+#include "content/common/content_export.h"
+#include "googleurl/src/gurl.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+namespace content {
+
+// Collects the favicon related information for a NavigationEntry.
+struct CONTENT_EXPORT FaviconStatus {
+ FaviconStatus();
+
+ // Indicates whether we've gotten an official favicon for the page, or are
+ // just using the default favicon.
+ bool valid;
+
+ // The URL of the favicon which was used to load it off the web.
+ GURL url;
+
+ // The favicon bitmap for the page. If the favicon has not been explicitly
+ // set or it empty, it will return the default favicon. Note that this is
+ // loaded asynchronously, so even if the favicon URL is valid we may return
+ // the default favicon if we haven't gotten the data yet.
+ SkBitmap bitmap;
+
+ // Copy and assignment is explicitly allowed for this struct.
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_FAVICON_STATUS_H_
diff --git a/content/public/browser/navigation_entry.h b/content/public/browser/navigation_entry.h
index ff7c5d7..ca9cb3e 100644
--- a/content/public/browser/navigation_entry.h
+++ b/content/public/browser/navigation_entry.h
@@ -16,6 +16,9 @@ class GURL;
namespace content {
+struct FaviconStatus;
+struct SSLStatus;
+
// A NavigationEntry is a data structure that captures all the information
// required to recreate a browsing state. This includes some opaque binary
// state as provided by the TabContents as well as some clear text title and
@@ -101,6 +104,14 @@ class NavigationEntry {
// WebKit to actually make the request.
virtual void SetHasPostData(bool has_post_data) = 0;
virtual bool GetHasPostData() const = 0;
+
+ // The favicon data and tracking information. See content::FaviconStatus.
+ virtual const FaviconStatus& GetFavicon() const = 0;
+ virtual FaviconStatus& GetFavicon() = 0;
+
+ // All the SSL flags and state. See content::SSLStatus.
+ virtual const SSLStatus& GetSSL() const = 0;
+ virtual SSLStatus& GetSSL() = 0;
};
} // namespace content
diff --git a/content/public/browser/ssl_status.cc b/content/public/browser/ssl_status.cc
new file mode 100644
index 0000000..9b1de15
--- /dev/null
+++ b/content/public/browser/ssl_status.cc
@@ -0,0 +1,18 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/browser/ssl_status.h"
+
+namespace content {
+
+SSLStatus::SSLStatus()
+ : security_style(SECURITY_STYLE_UNKNOWN),
+ cert_id(0),
+ cert_status(0),
+ security_bits(-1),
+ connection_status(0),
+ content_status(NORMAL_CONTENT) {
+}
+
+} // namespace content
diff --git a/content/public/browser/ssl_status.h b/content/public/browser/ssl_status.h
new file mode 100644
index 0000000..24c03fc
--- /dev/null
+++ b/content/public/browser/ssl_status.h
@@ -0,0 +1,63 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Defines the Geolocation access token store, and associated factory function.
+// An access token store is responsible for providing the API to persist
+// access tokens, one at a time, and to load them back on mass.
+// The API is a little more complex than one might wish, due to the need for
+// prefs access to happen asynchronously on the UI thread.
+// This API is provided as abstract base classes to allow mocking and testing
+// of clients, without dependency on browser process singleton objects etc.
+
+#ifndef CONTENT_PUBLIC_BROWSER_SSL_STATUS_H_
+#define CONTENT_PUBLIC_BROWSER_SSL_STATUS_H_
+#pragma once
+
+#include "content/common/content_export.h"
+#include "content/public/common/security_style.h"
+#include "net/base/cert_status_flags.h"
+
+namespace content {
+
+// Collects the SSL information for this NavigationEntry.
+struct CONTENT_EXPORT SSLStatus {
+ // Flags used for the page security content status.
+ enum ContentStatusFlags {
+ // HTTP page, or HTTPS page with no insecure content.
+ NORMAL_CONTENT = 0,
+
+ // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
+ DISPLAYED_INSECURE_CONTENT = 1 << 0,
+
+ // HTTPS page containing "executed" HTTP resources (i.e. script).
+ // Also currently used for HTTPS page containing broken-HTTPS resources;
+ // this is wrong and should be fixed (see comments in
+ // SSLPolicy::OnRequestStarted()).
+ RAN_INSECURE_CONTENT = 1 << 1,
+ };
+
+ SSLStatus();
+
+ bool Equals(const SSLStatus& status) const {
+ return security_style == status.security_style &&
+ cert_id == status.cert_id &&
+ cert_status == status.cert_status &&
+ security_bits == status.security_bits &&
+ content_status == status.content_status;
+ }
+
+ content::SecurityStyle security_style;
+ int cert_id;
+ net::CertStatus cert_status;
+ int security_bits;
+ int connection_status;
+ // A combination of the ContentStatusFlags above.
+ int content_status;
+
+ // Copy and assignment is explicitly allowed for this class.
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_SSL_STATUS_H_
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 546e859..518853f 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -10,7 +10,6 @@
#include "base/process_util.h"
#include "base/string16.h"
#include "content/browser/download/save_package.h"
-#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/page_navigator.h"
#include "content/browser/webui/web_ui.h"
#include "content/common/content_export.h"
@@ -48,6 +47,7 @@ class BrowserContext;
class RenderProcessHost;
class WebContentsDelegate;
struct RendererPreferences;
+struct SSLStatus;
// Describes what goes in the main content area of a tab.
class WebContents : public PageNavigator {
@@ -215,7 +215,7 @@ class WebContents : public PageNavigator {
// Shows the page info.
virtual void ShowPageInfo(const GURL& url,
- const ::NavigationEntry::SSLStatus& ssl,
+ const SSLStatus& ssl,
bool show_history) = 0;
// Window management ---------------------------------------------------------
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index d6e81bb..57bf077 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -10,7 +10,7 @@
#include <string>
#include "base/basictypes.h"
-#include "content/browser/tab_contents/navigation_entry.h"
+#include "base/string16.h"
#include "content/common/content_export.h"
#include "content/public/browser/navigation_type.h"
#include "content/public/common/page_transition_types.h"
@@ -35,6 +35,7 @@ class JavaScriptDialogCreator;
class WebContents;
class WebIntentsDispatcher;
struct FileChooserParams;
+struct SSLStatus;
}
namespace gfx {
@@ -223,7 +224,7 @@ class CONTENT_EXPORT WebContentsDelegate {
// showing how many times that URL has been visited is added to the page info.
virtual void ShowPageInfo(content::BrowserContext* browser_context,
const GURL& url,
- const ::NavigationEntry::SSLStatus& ssl,
+ const SSLStatus& ssl,
bool show_history) {}
// Opens source view for given tab contents that is navigated to the given
diff --git a/content/shell/shell_mac.mm b/content/shell/shell_mac.mm
index db9fc6d..f3f4ba8 100644
--- a/content/shell/shell_mac.mm
+++ b/content/shell/shell_mac.mm
@@ -9,6 +9,7 @@
#include "base/string_piece.h"
#include "base/sys_string_conversions.h"
#include "content/shell/resource.h"
+#include "googleurl/src/gurl.h"
// Receives notification that the window is closing so that it can start the
// tear-down process. Is responsible for deleting itself when done.