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

Side by Side Diff: chrome/browser/profiles/avatar_menu_model.cc

Issue 10384106: Extract StartupTabs and startup types from StartupBrowserCreator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | 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/profiles/avatar_menu_model.h" 5 #include "chrome/browser/profiles/avatar_menu_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 18 matching lines...) Expand all
29 namespace { 29 namespace {
30 30
31 void OnProfileCreated(bool always_create, 31 void OnProfileCreated(bool always_create,
32 Profile* profile, 32 Profile* profile,
33 Profile::CreateStatus status) { 33 Profile::CreateStatus status) {
34 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 34 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
35 35
36 if (status == Profile::CREATE_STATUS_INITIALIZED) { 36 if (status == Profile::CREATE_STATUS_INITIALIZED) {
37 ProfileManager::FindOrCreateNewWindowForProfile( 37 ProfileManager::FindOrCreateNewWindowForProfile(
38 profile, 38 profile,
39 StartupBrowserCreator::IS_NOT_PROCESS_STARTUP, 39 browser::startup::IS_NOT_PROCESS_STARTUP,
40 StartupBrowserCreator::IS_NOT_FIRST_RUN, 40 browser::startup::IS_NOT_FIRST_RUN,
41 always_create); 41 always_create);
42 } 42 }
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 AvatarMenuModel::AvatarMenuModel(ProfileInfoInterface* profile_cache, 47 AvatarMenuModel::AvatarMenuModel(ProfileInfoInterface* profile_cache,
48 AvatarMenuModelObserver* observer, 48 AvatarMenuModelObserver* observer,
49 Browser* browser) 49 Browser* browser)
50 : profile_info_(profile_cache), 50 : profile_info_(profile_cache),
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 item->active = browser_->profile()->GetPath() == path; 170 item->active = browser_->profile()->GetPath() == path;
171 } 171 }
172 items_.push_back(item); 172 items_.push_back(item);
173 } 173 }
174 } 174 }
175 175
176 void AvatarMenuModel::ClearMenu() { 176 void AvatarMenuModel::ClearMenu() {
177 STLDeleteContainerPointers(items_.begin(), items_.end()); 177 STLDeleteContainerPointers(items_.begin(), items_.end());
178 items_.clear(); 178 items_.clear();
179 } 179 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698