Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5193)

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 7714038: Reverts debugging code added in hopes of tracking crash. This also (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/json_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 4a734c9889a6bb9d71bcf5f1ba04baed25d85f3b..a471e6f06e4cdacd996f65c2b3f529b8bc624013 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -8,7 +8,6 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -33,17 +32,13 @@ namespace {
// been initialized.
// TODO(mirandac): This function will also separate windows by profile in a
// multi-profile environment.
-// TODO(sky): remove is_incognito. Used in tracking 91396.
-PrefService* GetPrefsForWindow(const views::Widget* window,
- bool* is_incognito) {
+PrefService* GetPrefsForWindow(const views::Widget* window) {
Profile* profile = reinterpret_cast<Profile*>(
window->GetNativeWindowProperty(Profile::kProfileKey));
- *is_incognito = false;
if (!profile) {
// Use local state for windows that have no explicit profile.
return g_browser_process->local_state();
}
- *is_incognito = profile->IsOffTheRecord();
return profile->GetPrefs();
}
@@ -67,18 +62,13 @@ void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window,
const std::wstring& window_name,
const gfx::Rect& bounds,
bool maximized) {
- bool is_incognito = false;
- PrefService* prefs = GetPrefsForWindow(window, &is_incognito);
+ PrefService* prefs = GetPrefsForWindow(window);
if (!prefs)
return;
- volatile browser_shutdown::ShutdownType shutdown_type =
- browser_shutdown::GetShutdownType();
- CHECK(prefs->FindPreference(WideToUTF8(window_name).c_str())) <<
- is_incognito << " " << shutdown_type;
+ DCHECK(prefs->FindPreference(WideToUTF8(window_name).c_str()));
DictionaryPrefUpdate update(prefs, WideToUTF8(window_name).c_str());
DictionaryValue* window_preferences = update.Get();
- CHECK(window_preferences) << is_incognito << " " << shutdown_type;
window_preferences->SetInteger("left", bounds.x());
window_preferences->SetInteger("top", bounds.y());
window_preferences->SetInteger("right", bounds.right());
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/json_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698