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

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

Issue 7792014: Fixes crash in Browser::Observe. We can end up here during creation of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment tweaks Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 3909 matching lines...) Expand 10 before | Expand all | Expand 10 after
3920 } 3920 }
3921 3921
3922 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { 3922 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: {
3923 if (window()->GetLocationBar()) 3923 if (window()->GetLocationBar())
3924 window()->GetLocationBar()->InvalidatePageActions(); 3924 window()->GetLocationBar()->InvalidatePageActions();
3925 break; 3925 break;
3926 } 3926 }
3927 3927
3928 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 3928 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
3929 case chrome::NOTIFICATION_EXTENSION_LOADED: 3929 case chrome::NOTIFICATION_EXTENSION_LOADED:
3930 if (window()->GetLocationBar()) 3930 // We can end up here when creating the window, at which point window_ is
3931 // NULL.
Ben Goodger (Google) 2011/08/30 17:19:49 Add the rest of your CL comment here about SHAppBa
3932 if (window() && window()->GetLocationBar())
3931 window()->GetLocationBar()->UpdatePageActions(); 3933 window()->GetLocationBar()->UpdatePageActions();
3932 break; 3934 break;
3933 3935
3934 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: 3936 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED:
3935 window()->UserChangedTheme(); 3937 window()->UserChangedTheme();
3936 break; 3938 break;
3937 3939
3938 case chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL: { 3940 case chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL: {
3939 // Handle EXTENSION_READY_FOR_INSTALL for last active tabbed browser. 3941 // Handle EXTENSION_READY_FOR_INSTALL for last active tabbed browser.
3940 if (BrowserList::FindTabbedBrowser(profile(), true) != this) 3942 if (BrowserList::FindTabbedBrowser(profile(), true) != this)
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5116 } 5118 }
5117 5119
5118 void Browser::ShowSyncSetup() { 5120 void Browser::ShowSyncSetup() {
5119 ProfileSyncService* service = 5121 ProfileSyncService* service =
5120 profile()->GetOriginalProfile()->GetProfileSyncService(); 5122 profile()->GetOriginalProfile()->GetProfileSyncService();
5121 if (service->HasSyncSetupCompleted()) 5123 if (service->HasSyncSetupCompleted())
5122 ShowOptionsTab(chrome::kSyncSetupSubPage); 5124 ShowOptionsTab(chrome::kSyncSetupSubPage);
5123 else 5125 else
5124 service->ShowLoginDialog(); 5126 service->ShowLoginDialog();
5125 } 5127 }
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