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

Side by Side Diff: chrome/browser/notifications/notification_options_menu_model.cc

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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/notifications/notification_options_menu_model.h" 5 #include "chrome/browser/notifications/notification_options_menu_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 extension_service->EnableExtension(id); 247 extension_service->EnableExtension(id);
248 } 248 }
249 break; 249 break;
250 } 250 }
251 case kOpenContentSettingsCommand: { 251 case kOpenContentSettingsCommand: {
252 Browser* browser = 252 Browser* browser =
253 browser::FindLastActiveWithProfile(balloon_->profile()); 253 browser::FindLastActiveWithProfile(balloon_->profile());
254 if (!browser) { 254 if (!browser) {
255 // It is possible that there is no browser window (e.g. when there are 255 // It is possible that there is no browser window (e.g. when there are
256 // background pages, or for a chrome frame process on windows). 256 // background pages, or for a chrome frame process on windows).
257 browser = Browser::Create(balloon_->profile()); 257 browser = new Browser(Browser::CreateParams(balloon_->profile()));
258 } 258 }
259 chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 259 chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
260 break; 260 break;
261 } 261 }
262 default: 262 default:
263 NOTREACHED(); 263 NOTREACHED();
264 break; 264 break;
265 } 265 }
266 } 266 }
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode_unittest.cc ('k') | chrome/browser/printing/print_preview_tab_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698