summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-14 15:51:10 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-14 15:51:10 +0000
commitbe3877f74da87b5be2b549f733b5705c9607ec82 (patch)
treea00fa6c37daf0467801e2cbb06660b360a6d449e /chrome/views
parent57a020e92927a379ab514db5836cb4550e6e444b (diff)
downloadchromium_src-be3877f74da87b5be2b549f733b5705c9607ec82.zip
chromium_src-be3877f74da87b5be2b549f733b5705c9607ec82.tar.gz
chromium_src-be3877f74da87b5be2b549f733b5705c9607ec82.tar.bz2
Provides the infrastructure for Browser unit tests that create a
BrowserWindow with only a TabStrip. I also converted two ui tests over to unit tests to make sure it all worked. I had to add a bunch of null checks to Browser and a couple of other places. BUG=none TEST=none Review URL: http://codereview.chromium.org/17386 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8007 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/window_delegate.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/views/window_delegate.cc b/chrome/views/window_delegate.cc
index 381ea14..171b642 100644
--- a/chrome/views/window_delegate.cc
+++ b/chrome/views/window_delegate.cc
@@ -29,7 +29,7 @@ void WindowDelegate::SaveWindowPlacement(const gfx::Rect& bounds,
bool maximized,
bool always_on_top) {
std::wstring window_name = GetWindowName();
- if (window_name.empty())
+ if (window_name.empty() || !g_browser_process->local_state())
return;
DictionaryValue* window_preferences =
@@ -72,6 +72,9 @@ bool WindowDelegate::GetSavedMaximizedState(bool* maximized) const {
}
bool WindowDelegate::GetSavedAlwaysOnTopState(bool* always_on_top) const {
+ if (!g_browser_process->local_state())
+ return false;
+
std::wstring window_name = GetWindowName();
if (window_name.empty())
return false;