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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 10536106: Avoid crash in trying to access profile while shutting down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 3886 matching lines...) Expand 10 before | Expand all | Expand 10 after
3897 window()->UserChangedTheme(); 3897 window()->UserChangedTheme();
3898 break; 3898 break;
3899 #endif 3899 #endif
3900 3900
3901 case chrome::NOTIFICATION_PREF_CHANGED: { 3901 case chrome::NOTIFICATION_PREF_CHANGED: {
3902 const std::string& pref_name = 3902 const std::string& pref_name =
3903 *content::Details<std::string>(details).ptr(); 3903 *content::Details<std::string>(details).ptr();
3904 if (pref_name == prefs::kPrintingEnabled) { 3904 if (pref_name == prefs::kPrintingEnabled) {
3905 UpdatePrintingState(GetContentRestrictionsForSelectedTab()); 3905 UpdatePrintingState(GetContentRestrictionsForSelectedTab());
3906 } else if (pref_name == prefs::kInstantEnabled) { 3906 } else if (pref_name == prefs::kInstantEnabled) {
3907 if (!InstantController::IsEnabled(profile())) { 3907 if (browser_shutdown::ShuttingDownWithoutClosingBrowsers() ||
Jói 2012/06/11 22:44:47 Don't you want the inverse condition?
sreeram 2012/06/11 22:53:03 No. If we are shutting down, the first clause retu
3908 !InstantController::IsEnabled(profile())) {
3908 if (instant()) { 3909 if (instant()) {
3909 instant()->DestroyPreviewContents(); 3910 instant()->DestroyPreviewContents();
3910 instant_.reset(); 3911 instant_.reset();
3911 instant_unload_handler_.reset(); 3912 instant_unload_handler_.reset();
3912 } 3913 }
3913 } else { 3914 } else {
3914 CreateInstantIfNecessary(); 3915 CreateInstantIfNecessary();
3915 } 3916 }
3916 } else if (pref_name == prefs::kIncognitoModeAvailability) { 3917 } else if (pref_name == prefs::kIncognitoModeAvailability) {
3917 UpdateCommandsForIncognitoAvailability(); 3918 UpdateCommandsForIncognitoAvailability();
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
5172 if (contents && !allow_js_access) { 5173 if (contents && !allow_js_access) {
5173 contents->web_contents()->GetController().LoadURL( 5174 contents->web_contents()->GetController().LoadURL(
5174 target_url, 5175 target_url,
5175 content::Referrer(), 5176 content::Referrer(),
5176 content::PAGE_TRANSITION_LINK, 5177 content::PAGE_TRANSITION_LINK,
5177 std::string()); // No extra headers. 5178 std::string()); // No extra headers.
5178 } 5179 }
5179 5180
5180 return contents != NULL; 5181 return contents != NULL;
5181 } 5182 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698