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

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

Issue 149481: Instead of forcing the homepage to be linux splash, force the startup action ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | chrome/browser/profile.cc » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // TODO(port): get rid of this include. It's used just to provide declarations 63 // TODO(port): get rid of this include. It's used just to provide declarations
64 // and stub definitions for classes we encouter during the porting effort. 64 // and stub definitions for classes we encouter during the porting effort.
65 #include "chrome/common/temp_scaffolding_stubs.h" 65 #include "chrome/common/temp_scaffolding_stubs.h"
66 #include <errno.h> 66 #include <errno.h>
67 #include <signal.h> 67 #include <signal.h>
68 #include <sys/resource.h> 68 #include <sys/resource.h>
69 #endif 69 #endif
70 70
71 #if defined(OS_LINUX) 71 #if defined(OS_LINUX)
72 #include "chrome/app/breakpad_linux.h" 72 #include "chrome/app/breakpad_linux.h"
73 // TODO(estade): remove this when the linux splash is removed.
74 #include "chrome/browser/session_startup_pref.h"
73 #endif 75 #endif
74 76
75 // TODO(port): several win-only methods have been pulled out of this, but 77 // TODO(port): several win-only methods have been pulled out of this, but
76 // BrowserMain() as a whole needs to be broken apart so that it's usable by 78 // BrowserMain() as a whole needs to be broken apart so that it's usable by
77 // other platforms. For now, it's just a stub. This is a serious work in 79 // other platforms. For now, it's just a stub. This is a serious work in
78 // progress and should not be taken as an indication of a real refactoring. 80 // progress and should not be taken as an indication of a real refactoring.
79 81
80 #if defined(OS_WIN) 82 #if defined(OS_WIN)
81 #include <windows.h> 83 #include <windows.h>
82 #include <commctrl.h> 84 #include <commctrl.h>
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 #endif // defined(OS_WIN) || defined(OS_LINUX) 528 #endif // defined(OS_WIN) || defined(OS_LINUX)
527 } 529 }
528 530
529 PrefService* user_prefs = profile->GetPrefs(); 531 PrefService* user_prefs = profile->GetPrefs();
530 DCHECK(user_prefs); 532 DCHECK(user_prefs);
531 533
532 // Now that local state and user prefs have been loaded, make the two pref 534 // Now that local state and user prefs have been loaded, make the two pref
533 // services aware of all our preferences. 535 // services aware of all our preferences.
534 browser::RegisterAllPrefs(user_prefs, local_state); 536 browser::RegisterAllPrefs(user_prefs, local_state);
535 537
538 #if defined(OS_LINUX)
539 // TODO(port): Remove ifdef when the Linux splash page is not needed.
540 SessionStartupPref startup_pref =
541 SessionStartupPref(SessionStartupPref::URLS);
542 startup_pref.urls.push_back(GURL("about:linux-splash"));
543 SessionStartupPref::SetStartupPref(profile, startup_pref);
544 #endif
545
536 // Now that all preferences have been registered, set the install date 546 // Now that all preferences have been registered, set the install date
537 // for the uninstall metrics if this is our first run. This only actually 547 // for the uninstall metrics if this is our first run. This only actually
538 // gets used if the user has metrics reporting enabled at uninstall time. 548 // gets used if the user has metrics reporting enabled at uninstall time.
539 int64 install_date = 549 int64 install_date =
540 local_state->GetInt64(prefs::kUninstallMetricsInstallDate); 550 local_state->GetInt64(prefs::kUninstallMetricsInstallDate);
541 if (install_date == 0) { 551 if (install_date == 0) {
542 local_state->SetInt64(prefs::kUninstallMetricsInstallDate, 552 local_state->SetInt64(prefs::kUninstallMetricsInstallDate,
543 base::Time::Now().ToTimeT()); 553 base::Time::Now().ToTimeT());
544 } 554 }
545 555
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 if (metrics) 776 if (metrics)
767 metrics->Stop(); 777 metrics->Stop();
768 778
769 // browser_shutdown takes care of deleting browser_process, so we need to 779 // browser_shutdown takes care of deleting browser_process, so we need to
770 // release it. 780 // release it.
771 browser_process.release(); 781 browser_process.release();
772 browser_shutdown::Shutdown(); 782 browser_shutdown::Shutdown();
773 783
774 return result_code; 784 return result_code;
775 } 785 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698