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

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

Issue 11549025: Read the ChromeOS channel info earlier during startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #endif 127 #endif
128 128
129 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 129 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
130 #include "chrome/browser/first_run/upgrade_util_linux.h" 130 #include "chrome/browser/first_run/upgrade_util_linux.h"
131 #endif 131 #endif
132 132
133 #if defined(OS_CHROMEOS) 133 #if defined(OS_CHROMEOS)
134 #include "chrome/browser/chromeos/cros/cros_library.h" 134 #include "chrome/browser/chromeos/cros/cros_library.h"
135 #include "chrome/browser/chromeos/settings/cros_settings.h" 135 #include "chrome/browser/chromeos/settings/cros_settings.h"
136 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 136 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
137 #include "chrome/browser/chromeos/system/statistics_provider.h"
137 #endif 138 #endif
138 139
139 // TODO(port): several win-only methods have been pulled out of this, but 140 // TODO(port): several win-only methods have been pulled out of this, but
140 // BrowserMain() as a whole needs to be broken apart so that it's usable by 141 // BrowserMain() as a whole needs to be broken apart so that it's usable by
141 // other platforms. For now, it's just a stub. This is a serious work in 142 // other platforms. For now, it's just a stub. This is a serious work in
142 // progress and should not be taken as an indication of a real refactoring. 143 // progress and should not be taken as an indication of a real refactoring.
143 144
144 #if defined(OS_WIN) 145 #if defined(OS_WIN)
145 #include "base/environment.h" // For PreRead experiment. 146 #include "base/environment.h" // For PreRead experiment.
146 #include "base/win/windows_version.h" 147 #include "base/win/windows_version.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 status = tracked_objects::ThreadData::PROFILING_CHILDREN_ACTIVE; 719 status = tracked_objects::ThreadData::PROFILING_CHILDREN_ACTIVE;
719 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status); 720 tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status);
720 } 721 }
721 722
722 if (parsed_command_line().HasSwitch(switches::kProfilingOutputFile)) { 723 if (parsed_command_line().HasSwitch(switches::kProfilingOutputFile)) {
723 tracking_objects_.set_output_file_path( 724 tracking_objects_.set_output_file_path(
724 parsed_command_line().GetSwitchValuePath( 725 parsed_command_line().GetSwitchValuePath(
725 switches::kProfilingOutputFile)); 726 switches::kProfilingOutputFile));
726 } 727 }
727 728
729 #if defined(OS_CHROMEOS)
730 chromeos::system::StatisticsProvider::GetInstance()->Init();
kochi 2012/12/13 14:17:30 Could you add a comment why the initialization of
Alexei Svitkine (slow) 2012/12/13 15:45:49 Done.
731 #endif
732
728 local_state_ = InitializeLocalState(local_state_task_runner, 733 local_state_ = InitializeLocalState(local_state_task_runner,
729 parsed_command_line(), 734 parsed_command_line(),
730 is_first_run_); 735 is_first_run_);
731 736
732 // These members must be initialized before returning from this function. 737 // These members must be initialized before returning from this function.
733 master_prefs_.reset(new first_run::MasterPrefs); 738 master_prefs_.reset(new first_run::MasterPrefs);
734 739
735 #if !defined(OS_ANDROID) 740 #if !defined(OS_ANDROID)
736 // Android doesn't use StartupBrowserCreator. 741 // Android doesn't use StartupBrowserCreator.
737 browser_creator_.reset(new StartupBrowserCreator); 742 browser_creator_.reset(new StartupBrowserCreator);
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 if (base::win::GetVersion() <= base::win::VERSION_XP) 1668 if (base::win::GetVersion() <= base::win::VERSION_XP)
1664 uma_name += "_XP"; 1669 uma_name += "_XP";
1665 1670
1666 uma_name += "_PreRead_"; 1671 uma_name += "_PreRead_";
1667 uma_name += pre_read_percentage; 1672 uma_name += pre_read_percentage;
1668 AddPreReadHistogramTime(uma_name.c_str(), time); 1673 AddPreReadHistogramTime(uma_name.c_str(), time);
1669 } 1674 }
1670 #endif 1675 #endif
1671 #endif 1676 #endif
1672 } 1677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698