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

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

Issue 11968034: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: git://nomatter.syd/chromium/src.git@master
Patch Set: Created 7 years, 11 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
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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 ListPrefUpdate update(g_browser_process->local_state(), 327 ListPrefUpdate update(g_browser_process->local_state(),
328 prefs::kProfilesLastActive); 328 prefs::kProfilesLastActive);
329 ListValue* profile_list = update.Get(); 329 ListValue* profile_list = update.Get();
330 profile_list->Clear(); 330 profile_list->Clear();
331 } 331 }
332 #if defined(OS_CHROMEOS) 332 #if defined(OS_CHROMEOS)
333 // TODO(ivankr): http://crbug.com/83792 333 // TODO(ivankr): http://crbug.com/83792
334 profile = g_browser_process->profile_manager()->GetDefaultProfile( 334 profile = g_browser_process->profile_manager()->GetDefaultProfile(
335 user_data_dir); 335 user_data_dir);
336 #else 336 #else
337 profile = g_browser_process->profile_manager()->GetLastUsedProfile( 337 if (parsed_command_line.HasSwitch(switches::kShowAppList)) {
338 user_data_dir); 338 profile = g_browser_process->profile_manager()->GetAppListProfile(
339 user_data_dir);
340 } else {
341 profile = g_browser_process->profile_manager()->GetLastUsedProfile(
342 user_data_dir);
343 }
339 #endif 344 #endif
340 if (profile) 345 if (profile)
341 return profile; 346 return profile;
342 347
343 #if defined(OS_WIN) 348 #if defined(OS_WIN)
344 #if defined(USE_AURA) 349 #if defined(USE_AURA)
345 // TODO(beng): 350 // TODO(beng):
346 NOTIMPLEMENTED(); 351 NOTIMPLEMENTED();
347 #else 352 #else
348 // Ideally, we should be able to run w/o access to disk. For now, we 353 // Ideally, we should be able to run w/o access to disk. For now, we
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 if (base::win::GetVersion() <= base::win::VERSION_XP) 1670 if (base::win::GetVersion() <= base::win::VERSION_XP)
1666 uma_name += "_XP"; 1671 uma_name += "_XP";
1667 1672
1668 uma_name += "_PreRead_"; 1673 uma_name += "_PreRead_";
1669 uma_name += pre_read_percentage; 1674 uma_name += pre_read_percentage;
1670 AddPreReadHistogramTime(uma_name.c_str(), time); 1675 AddPreReadHistogramTime(uma_name.c_str(), time);
1671 } 1676 }
1672 #endif 1677 #endif
1673 #endif 1678 #endif
1674 } 1679 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698