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

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

Issue 10538095: Merge 141554 - Avoid crash in trying to access profile while shutting down. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/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 4217 matching lines...) Expand 10 before | Expand all | Expand 10 after
4228 #endif 4228 #endif
4229 4229
4230 case chrome::NOTIFICATION_PREF_CHANGED: { 4230 case chrome::NOTIFICATION_PREF_CHANGED: {
4231 const std::string& pref_name = 4231 const std::string& pref_name =
4232 *content::Details<std::string>(details).ptr(); 4232 *content::Details<std::string>(details).ptr();
4233 if (pref_name == prefs::kPrintingEnabled) { 4233 if (pref_name == prefs::kPrintingEnabled) {
4234 UpdatePrintingState(GetContentRestrictionsForSelectedTab()); 4234 UpdatePrintingState(GetContentRestrictionsForSelectedTab());
4235 } else if (pref_name == prefs::kInstantEnabled || 4235 } else if (pref_name == prefs::kInstantEnabled ||
4236 pref_name == prefs::kMetricsReportingEnabled || 4236 pref_name == prefs::kMetricsReportingEnabled ||
4237 pref_name == prefs::kSearchSuggestEnabled) { 4237 pref_name == prefs::kSearchSuggestEnabled) {
4238 if (!InstantController::IsEnabled(profile())) { 4238 if (browser_shutdown::ShuttingDownWithoutClosingBrowsers() ||
4239 !InstantController::IsEnabled(profile())) {
4239 if (instant()) { 4240 if (instant()) {
4240 instant()->DestroyPreviewContents(); 4241 instant()->DestroyPreviewContents();
4241 instant_.reset(); 4242 instant_.reset();
4242 instant_unload_handler_.reset(); 4243 instant_unload_handler_.reset();
4243 } 4244 }
4244 } else { 4245 } else {
4245 CreateInstantIfNecessary(); 4246 CreateInstantIfNecessary();
4246 } 4247 }
4247 } else if (pref_name == prefs::kIncognitoModeAvailability) { 4248 } else if (pref_name == prefs::kIncognitoModeAvailability) {
4248 UpdateCommandsForIncognitoAvailability(); 4249 UpdateCommandsForIncognitoAvailability();
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
5495 if (contents && !allow_js_access) { 5496 if (contents && !allow_js_access) {
5496 contents->web_contents()->GetController().LoadURL( 5497 contents->web_contents()->GetController().LoadURL(
5497 target_url, 5498 target_url,
5498 content::Referrer(), 5499 content::Referrer(),
5499 content::PAGE_TRANSITION_LINK, 5500 content::PAGE_TRANSITION_LINK,
5500 std::string()); // No extra headers. 5501 std::string()); // No extra headers.
5501 } 5502 }
5502 5503
5503 return contents != NULL; 5504 return contents != NULL;
5504 } 5505 }
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