summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/profile.cc13
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc26
-rw-r--r--chrome/browser/renderer_host/render_view_host.h21
-rw-r--r--chrome/browser/renderer_host/renderer_security_policy.cc8
-rw-r--r--chrome/browser/views/frame/browser_view.cc26
-rw-r--r--chrome/browser/views/frame/browser_view.h21
-rw-r--r--chrome/common/render_messages_internal.h10
-rw-r--r--chrome/renderer/render_view.cc32
-rw-r--r--chrome/renderer/render_view.h13
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc6
-rw-r--r--webkit/glue/webview_delegate.h4
11 files changed, 7 insertions, 173 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 44f8c17..a234ac5 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -347,9 +347,6 @@ class OffTheRecordProfileImpl : public Profile,
ProfileImpl::ProfileImpl(const FilePath& path)
: path_(path),
off_the_record_(false),
-#ifdef CHROME_PERSONALIZATION
- personalization_(NULL),
-#endif
request_context_(NULL),
media_request_context_(NULL),
history_service_created_(false),
@@ -367,6 +364,12 @@ ProfileImpl::ProfileImpl(const FilePath& path)
PrefService* prefs = GetPrefs();
prefs->AddPrefObserver(prefs::kSpellCheckDictionary, this);
prefs->AddPrefObserver(prefs::kEnableSpellCheck, this);
+
+#ifdef CHROME_PERSONALIZATION
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableP13n))
+ personalization_.reset(Personalization::CreateProfilePersonalization(this));
+#endif
+
#if defined(OS_LINUX)
// TODO(port): Remove ifdef when the Linux splash page is not needed.
prefs->transient()->SetString(prefs::kHomePage, "about:linux-splash");
@@ -900,10 +903,6 @@ void ProfileImpl::StopCreateSessionServiceTimer() {
#ifdef CHROME_PERSONALIZATION
ProfilePersonalization* ProfileImpl::GetProfilePersonalization() {
- DCHECK(!Personalization::IsP13NDisabled());
- if (!personalization_.get())
- personalization_.reset(
- Personalization::CreateProfilePersonalization(this));
return personalization_.get();
}
#endif
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 76b8d5a..c6165e6 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -110,19 +110,11 @@ RenderViewHost::RenderViewHost(SiteInstance* instance,
modal_dialog_event = new base::WaitableEvent(true, false);
modal_dialog_event_.reset(modal_dialog_event);
-#ifdef CHROME_PERSONALIZATION
- personalization_ = Personalization::CreateHostPersonalization(this);
-#endif
}
RenderViewHost::~RenderViewHost() {
OnDebugDisconnect();
-#ifdef CHROME_PERSONALIZATION
- Personalization::CleanupHostPersonalization(personalization_);
- personalization_ = NULL;
-#endif
-
// Be sure to clean up any leftover state from cross-site requests.
Singleton<CrossSiteRequestManager>()->SetHasPendingCrossSiteRequest(
process()->pid(), routing_id(), false);
@@ -726,10 +718,6 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
OnMsgDOMUISend)
IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardMessageToExternalHost,
OnMsgForwardMessageToExternalHost)
-#ifdef CHROME_PERSONALIZATION
- IPC_MESSAGE_HANDLER(ViewHostMsg_PersonalizationEvent,
- OnPersonalizationEvent)
-#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset,
OnMsgGoToEntryAtOffset)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText)
@@ -1083,13 +1071,6 @@ void RenderViewHost::OnMsgForwardMessageToExternalHost(
delegate_->ProcessExternalHostMessage(message, origin, target);
}
-#ifdef CHROME_PERSONALIZATION
-void RenderViewHost::OnPersonalizationEvent(const std::string& message,
- const std::string& content) {
- Personalization::HandlePersonalizationEvent(this, message, content);
-}
-#endif
-
void RenderViewHost::DisassociateFromPopupCount() {
Send(new ViewMsg_DisassociateFromPopupCount(routing_id()));
}
@@ -1360,13 +1341,6 @@ void RenderViewHost::OnDebugDisconnect() {
}
}
-#ifdef CHROME_PERSONALIZATION
-void RenderViewHost::RaisePersonalizationEvent(std::string event_name,
- std::string event_arg) {
- Send(new ViewMsg_PersonalizationEvent(routing_id(), event_name, event_arg));
-}
-#endif
-
void RenderViewHost::ForwardMessageFromExternalHost(const std::string& message,
const std::string& origin,
const std::string& target) {
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index 976a434..babb93d 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -14,9 +14,6 @@
#include "chrome/browser/renderer_host/render_widget_host.h"
#include "chrome/common/modal_dialog_event.h"
#include "chrome/common/page_zoom.h"
-#ifdef CHROME_PERSONALIZATION
-#include "chrome/personalization/personalization.h"
-#endif
#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "webkit/glue/autofill_form.h"
#include "webkit/glue/password_form_dom_manager.h"
@@ -390,16 +387,6 @@ class RenderViewHost : public RenderWidgetHost {
// and we're necessarily leaving the page.
void UnloadListenerHasFired() { has_unload_listener_ = false; }
-#ifdef CHROME_PERSONALIZATION
- // Tells the RenderView to raise an personalization event with the given name
- // and argument.
- void RaisePersonalizationEvent(std::string event_name, std::string event_arg);
-
- HostPersonalization personalization() {
- return personalization_;
- }
-#endif
-
// Forward a message from external host to chrome renderer.
void ForwardMessageFromExternalHost(const std::string& message,
const std::string& origin,
@@ -501,10 +488,6 @@ class RenderViewHost : public RenderWidgetHost {
void OnMsgForwardMessageToExternalHost(const std::string& message,
const std::string& origin,
const std::string& target);
-#ifdef CHROME_PERSONALIZATION
- void OnPersonalizationEvent(const std::string& message,
- const std::string& content);
-#endif
void OnMsgGoToEntryAtOffset(int offset);
void OnMsgSetTooltipText(const std::wstring& tooltip_text);
void OnMsgSelectionChanged(const std::string& text);
@@ -587,10 +570,6 @@ class RenderViewHost : public RenderWidgetHost {
// Our delegate, which wants to know about changes in the RenderView.
RenderViewHostDelegate* delegate_;
-#ifdef CHROME_PERSONALIZATION
- HostPersonalization personalization_;
-#endif
-
// true if we are currently waiting for a response for drag context
// information.
bool waiting_for_drag_context_response_;
diff --git a/chrome/browser/renderer_host/renderer_security_policy.cc b/chrome/browser/renderer_host/renderer_security_policy.cc
index fd34ef6..ae78380 100644
--- a/chrome/browser/renderer_host/renderer_security_policy.cc
+++ b/chrome/browser/renderer_host/renderer_security_policy.cc
@@ -8,9 +8,6 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "chrome/common/url_constants.h"
-#ifdef CHROME_PERSONALIZATION
-#include "chrome/personalization/personalization.h"
-#endif
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request.h"
@@ -245,11 +242,6 @@ bool RendererSecurityPolicy::CanRequestURL(int renderer_id, const GURL& url) {
return false;
}
-#ifdef CHROME_PERSONALIZATION
- if (url.SchemeIs(kPersonalizationScheme))
- return true;
-#endif
-
if (!URLRequest::IsHandledURL(url))
return true; // This URL request is destined for ShellExecute.
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index e9378ff..cf638b7 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -280,12 +280,7 @@ BrowserView::BrowserView(Browser* browser)
initialized_(false),
ignore_layout_(false),
hung_window_detector_(&hung_plugin_action_),
- ticker_(0)
-#ifdef CHROME_PERSONALIZATION
- , personalization_enabled_(false),
- personalization_(NULL)
-#endif
- {
+ ticker_(0) {
InitClass();
browser_->tabstrip_model()->AddObserver(this);
}
@@ -1188,12 +1183,6 @@ void BrowserView::Layout() {
if (find_controller)
find_controller->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
LayoutStatusBubble(bottom);
-#ifdef CHROME_PERSONALIZATION
- if (IsPersonalizationEnabled()) {
- Personalization::ConfigureFramePersonalization(personalization_,
- toolbar_, 0);
- }
-#endif
SchedulePaint();
}
@@ -1243,15 +1232,6 @@ void BrowserView::Init() {
status_bubble_.reset(new StatusBubbleViews(GetWidget()));
-#ifdef CHROME_PERSONALIZATION
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- EnablePersonalization(!command_line.HasSwitch(switches::kDisableP13n));
- if (IsPersonalizationEnabled()) {
- personalization_ = Personalization::CreateFramePersonalization(
- browser_->profile(), this);
- }
-#endif
-
InitSystemMenu();
}
@@ -1292,10 +1272,6 @@ int BrowserView::LayoutTabStrip() {
int BrowserView::LayoutToolbar(int top) {
int browser_view_width = width();
-#ifdef CHROME_PERSONALIZATION
- if (IsPersonalizationEnabled())
- Personalization::AdjustBrowserView(personalization_, &browser_view_width);
-#endif
bool visible = IsToolbarVisible();
toolbar_->GetLocationBarView()->SetFocusable(visible);
int y = top -
diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h
index 30b5aaf6..fa9202e 100644
--- a/chrome/browser/views/frame/browser_view.h
+++ b/chrome/browser/views/frame/browser_view.h
@@ -9,9 +9,6 @@
#include "chrome/browser/browser_window.h"
#include "chrome/browser/hang_monitor/hung_plugin_action.h"
#include "chrome/browser/hang_monitor/hung_window_detector.h"
-#ifdef CHROME_PERSONALIZATION
-#include "chrome/personalization/personalization.h"
-#endif
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/frame/browser_frame.h"
#include "chrome/views/window/client_view.h"
@@ -243,18 +240,6 @@ class BrowserView : public BrowserWindow,
// Overridden from views::ClientView:
virtual bool CanClose() const;
virtual int NonClientHitTest(const gfx::Point& point);
-
- // Is P13N enabled for this browser window?
-#ifdef CHROME_PERSONALIZATION
- virtual bool IsPersonalizationEnabled() const {
- return personalization_enabled_;
- }
-
- void EnablePersonalization(bool enable_personalization) {
- personalization_enabled_ = enable_personalization;
- }
-#endif
-
virtual std::string GetClassName() const;
protected:
@@ -411,12 +396,6 @@ class BrowserView : public BrowserWindow,
// The timer used to update frames for the Loading Animation.
base::RepeatingTimer<BrowserView> loading_animation_timer_;
- // P13N stuff
-#ifdef CHROME_PERSONALIZATION
- FramePersonalization personalization_;
- bool personalization_enabled_;
-#endif
-
DISALLOW_COPY_AND_ASSIGN(BrowserView);
};
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index e254c4f..fe0161e 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -465,11 +465,6 @@ IPC_BEGIN_MESSAGES(View)
IPC_MESSAGE_ROUTED1(ViewMsg_Repaint,
gfx::Size /* The view size to be repainted */)
-#ifdef CHROME_PERSONALIZATION
- IPC_MESSAGE_ROUTED2(ViewMsg_PersonalizationEvent,
- std::string /* event name */,
- std::string /* event arguments */)
-#endif
// Posts a message to the renderer.
IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
std::string /* The message */,
@@ -879,11 +874,6 @@ IPC_BEGIN_MESSAGES(ViewHost)
std::string /* origin */,
std::string /* target */)
-#ifdef CHROME_PERSONALIZATION
- IPC_MESSAGE_ROUTED2(ViewHostMsg_PersonalizationEvent,
- std::string, std::string)
-#endif
-
// A renderer sends this to the browser process when it wants to create a
// plugin. The browser will create the plugin process if necessary, and
// will return the channel name on success. On error an empty string is
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index e3cbc9f..f8063d5 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -200,9 +200,6 @@ RenderView::RenderView(RenderThreadBase* render_thread)
form_field_autofill_request_id_(0),
popup_notification_visible_(false),
delay_seconds_for_form_state_sync_(kDefaultDelaySecondsForFormStateSync) {
-#ifdef CHROME_PERSONALIZATION
- personalization_ = Personalization::CreateRendererPersonalization();
-#endif
}
RenderView::~RenderView() {
@@ -218,11 +215,6 @@ RenderView::~RenderView() {
render_thread_->RemoveFilter(debug_message_handler_);
render_thread_->RemoveFilter(audio_message_filter_);
-
-#ifdef CHROME_PERSONALIZATION
- Personalization::CleanupRendererPersonalization(personalization_);
- personalization_ = NULL;
-#endif
}
/*static*/
@@ -429,9 +421,6 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_ShouldClose, OnMsgShouldClose)
IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
IPC_MESSAGE_HANDLER(ViewMsg_ThemeChanged, OnThemeChanged)
-#ifdef CHROME_PERSONALIZATION
- IPC_MESSAGE_HANDLER(ViewMsg_PersonalizationEvent, OnPersonalizationEvent)
-#endif
IPC_MESSAGE_HANDLER(ViewMsg_HandleMessageFromExternalHost,
OnMessageFromExternalHost)
IPC_MESSAGE_HANDLER(ViewMsg_DisassociateFromPopupCount,
@@ -1533,11 +1522,6 @@ void RenderView::WindowObjectCleared(WebFrame* webframe) {
external_host_bindings_.set_routing_id(routing_id_);
external_host_bindings_.BindToJavascript(webframe, L"externalHost");
}
-
-#ifdef CHROME_PERSONALIZATION
- Personalization::ConfigureRendererPersonalization(personalization_, this,
- routing_id_, webframe);
-#endif
}
void RenderView::DocumentElementAvailable(WebFrame* frame) {
@@ -2862,22 +2846,6 @@ void RenderView::OnThemeChanged() {
#endif
}
-#ifdef CHROME_PERSONALIZATION
-void RenderView::OnPersonalizationEvent(std::string event_name,
- std::string event_args) {
- Personalization::HandleViewMsgPersonalizationEvent(personalization_,
- webview(),
- event_name,
- event_args);
-}
-#endif
-
-void RenderView::TransitionToCommittedForNewPage() {
-#ifdef CHROME_PERSONALIZATION
- Personalization::HandleTransitionToCommittedForNewPage(personalization_);
-#endif
-}
-
void RenderView::DidAddHistoryItem() {
// We don't want to update the history length for the start page
// navigation.
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 505dca0..2bf2dee 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -18,9 +18,6 @@
#include "base/timer.h"
#include "base/values.h"
#include "build/build_config.h"
-#ifdef CHROME_PERSONALIZATION
-#include "chrome/personalization/personalization.h"
-#endif
#include "chrome/renderer/automation/dom_automation_controller.h"
#include "chrome/renderer/dom_ui_bindings.h"
#include "chrome/renderer/external_host_bindings.h"
@@ -566,10 +563,6 @@ class RenderView : public RenderWidget,
// Message that the popup notification has been shown or hidden.
void OnPopupNotificationVisiblityChanged(bool visible);
-#ifdef CHROME_PERSONALIZATION
- void OnPersonalizationEvent(std::string event_name, std::string event_args);
-#endif
-
// Handles messages posted from automation.
void OnMessageFromExternalHost(const std::string& message,
const std::string& origin,
@@ -623,8 +616,6 @@ class RenderView : public RenderWidget,
std::string GetAltHTMLForTemplate(const DictionaryValue& error_strings,
int template_resource_id) const;
- virtual void TransitionToCommittedForNewPage();
-
virtual void DidAddHistoryItem();
// Decodes a data: URL image or returns an empty image in case of failure.
@@ -645,10 +636,6 @@ class RenderView : public RenderWidget,
// Chrome page<->browser messaging CppBoundClass.
DOMUIBindings dom_ui_bindings_;
-#ifdef CHROME_PERSONALIZATION
- RendererPersonalization personalization_;
-#endif
-
// window.external object for "built-in" JS extensions
ExternalJSObject external_js_object_;
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index e9bc9dc..a22914c 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -1362,12 +1362,6 @@ void WebFrameLoaderClient::transitionToCommittedFromCachedFrame(WebCore::CachedF
// Called when the FrameLoader goes into a state in which a new page load
// will occur.
void WebFrameLoaderClient::transitionToCommittedForNewPage() {
- WebViewImpl* webview = webframe_->webview_impl();
- WebViewDelegate* d = webview->delegate();
- // Notify the RenderView.
- if (d) {
- d->TransitionToCommittedForNewPage();
- }
makeDocumentView();
}
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 1a170b3..d62024f 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -767,10 +767,6 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
virtual void WebInspectorOpened(int num_resources) { }
- // Called when the FrameLoader goes into a state in which a new page load
- // will occur.
- virtual void TransitionToCommittedForNewPage() { }
-
// Called when an item was added to the history
virtual void DidAddHistoryItem() { }