summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-29 21:01:07 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-29 21:01:07 +0000
commit23258be02f648a6c20c685f15c9feb9047e5db52 (patch)
treeba0297f1c4453709ee1e427810dfb13c49085056 /chrome
parent292e4fb0b259c45565f901733dc04f3c3ce22ed5 (diff)
downloadchromium_src-23258be02f648a6c20c685f15c9feb9047e5db52.zip
chromium_src-23258be02f648a6c20c685f15c9feb9047e5db52.tar.gz
chromium_src-23258be02f648a6c20c685f15c9feb9047e5db52.tar.bz2
Add a command line switch for fastback work.
patch by abarth@chromium.org R=darin BUG=2879 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/web_contents.cc2
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/common/render_messages.h4
5 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 7705d94..53ff71e 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -219,11 +219,11 @@ class NavigationNotificationObserver : public NotificationObserver {
automation_->Send(*response);
*response = NULL; // *response is deleted by Send.
}
- automation_->RemoveNavigationStatusListener(this);
delete this;
}
void Unregister() {
+ automation_->RemoveNavigationStatusListener(this);
NotificationService* service = NotificationService::current();
service->RemoveObserver(this, NOTIFY_NAV_ENTRY_COMMITTED,
Source<NavigationController>(controller_));
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc
index 782df56..c31f256 100644
--- a/chrome/browser/web_contents.cc
+++ b/chrome/browser/web_contents.cc
@@ -1585,6 +1585,8 @@ WebPreferences WebContents::GetWebkitPrefs() {
web_prefs.loads_images_automatically =
!command_line.HasSwitch(switches::kDisableImages) &&
prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically);
+ web_prefs.uses_page_cache =
+ command_line.HasSwitch(switches::kEnableFastback);
}
web_prefs.uses_universal_detector =
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 742eee1..18caf51 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -315,6 +315,9 @@ const wchar_t kGearsInRenderer[] = L"gears-in-renderer";
// Enable new HTTP stack.
const wchar_t kUseNewHttp[] = L"new-http";
+// Enable the fastback page cache.
+const wchar_t kEnableFastback[] = L"enable-fastback";
+
// Allow loading of the javascript debugger UI from the filesystem.
const wchar_t kJavaScriptDebuggerPath[] = L"javascript-debugger-path";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 9df559b..b137992 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -120,6 +120,8 @@ extern const wchar_t kGearsInRenderer[];
extern const wchar_t kUseNewHttp[];
+extern const wchar_t kEnableFastback[];
+
extern const wchar_t kJavaScriptDebuggerPath[];
extern const wchar_t kEnableP13n[];
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 95268a0..3c2ee58 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1443,6 +1443,7 @@ struct ParamTraits<WebPreferences> {
WriteParam(m, p.java_enabled);
WriteParam(m, p.user_style_sheet_enabled);
WriteParam(m, p.user_style_sheet_location);
+ WriteParam(m, p.uses_page_cache);
}
static bool Read(const Message* m, void** iter, param_type* p) {
return
@@ -1469,7 +1470,8 @@ struct ParamTraits<WebPreferences> {
ReadParam(m, iter, &p->dashboard_compatibility_mode) &&
ReadParam(m, iter, &p->java_enabled) &&
ReadParam(m, iter, &p->user_style_sheet_enabled) &&
- ReadParam(m, iter, &p->user_style_sheet_location);
+ ReadParam(m, iter, &p->user_style_sheet_location) &&
+ ReadParam(m, iter, &p->uses_page_cache);
}
static void Log(const param_type& p, std::wstring* l) {
l->append(L"<WebPreferences>");