| OLD | NEW |
| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 #include <Security/Security.h> | 166 #include <Security/Security.h> |
| 167 | 167 |
| 168 #include "base/mac/scoped_nsautorelease_pool.h" | 168 #include "base/mac/scoped_nsautorelease_pool.h" |
| 169 #include "chrome/browser/mac/keystone_glue.h" | 169 #include "chrome/browser/mac/keystone_glue.h" |
| 170 #endif | 170 #endif |
| 171 | 171 |
| 172 #if defined(ENABLE_CONFIGURATION_POLICY) | 172 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 173 #include "policy/policy_constants.h" | 173 #include "policy/policy_constants.h" |
| 174 #endif | 174 #endif |
| 175 | 175 |
| 176 #if defined(ENABLE_GOOGLE_NOW) |
| 177 #include "chrome/browser/ui/google_now/google_now_service_factory.h" |
| 178 #endif |
| 179 |
| 176 #if defined(ENABLE_LANGUAGE_DETECTION) | 180 #if defined(ENABLE_LANGUAGE_DETECTION) |
| 177 #include "chrome/browser/language_usage_metrics.h" | 181 #include "chrome/browser/language_usage_metrics.h" |
| 178 #endif | 182 #endif |
| 179 | 183 |
| 180 #if defined(ENABLE_RLZ) | 184 #if defined(ENABLE_RLZ) |
| 181 #include "chrome/browser/rlz/rlz.h" | 185 #include "chrome/browser/rlz/rlz.h" |
| 182 #endif | 186 #endif |
| 183 | 187 |
| 184 #if defined(TOOLKIT_VIEWS) | 188 #if defined(TOOLKIT_VIEWS) |
| 185 #include "ui/views/focus/accelerator_handler.h" | 189 #include "ui/views/focus/accelerator_handler.h" |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 gpu_util::InstallBrowserMonitor(); | 939 gpu_util::InstallBrowserMonitor(); |
| 936 #endif | 940 #endif |
| 937 } | 941 } |
| 938 | 942 |
| 939 void ChromeBrowserMainParts::PostBrowserStart() { | 943 void ChromeBrowserMainParts::PostBrowserStart() { |
| 940 #if !defined(OS_ANDROID) | 944 #if !defined(OS_ANDROID) |
| 941 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kVisitURLs)) | 945 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kVisitURLs)) |
| 942 RunPageCycler(); | 946 RunPageCycler(); |
| 943 #endif | 947 #endif |
| 944 | 948 |
| 949 // Create the instance of the Google Now service. |
| 950 #if defined(ENABLE_GOOGLE_NOW) |
| 951 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 952 switches::kEnableGoogleNowIntegration)) { |
| 953 GoogleNowServiceFactory::GetForProfile(profile_); |
| 954 } |
| 955 #endif |
| 956 |
| 945 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 957 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 946 chrome_extra_parts_[i]->PostBrowserStart(); | 958 chrome_extra_parts_[i]->PostBrowserStart(); |
| 947 #if !defined(OS_ANDROID) | 959 #if !defined(OS_ANDROID) |
| 948 // Allow ProcessSingleton to process messages. | 960 // Allow ProcessSingleton to process messages. |
| 949 process_singleton_->Unlock(); | 961 process_singleton_->Unlock(); |
| 950 #endif | 962 #endif |
| 951 } | 963 } |
| 952 | 964 |
| 953 #if !defined(OS_ANDROID) | 965 #if !defined(OS_ANDROID) |
| 954 void ChromeBrowserMainParts::RunPageCycler() { | 966 void ChromeBrowserMainParts::RunPageCycler() { |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1721 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1710 uma_name += "_XP"; | 1722 uma_name += "_XP"; |
| 1711 | 1723 |
| 1712 uma_name += "_PreRead_"; | 1724 uma_name += "_PreRead_"; |
| 1713 uma_name += pre_read_percentage; | 1725 uma_name += pre_read_percentage; |
| 1714 AddPreReadHistogramTime(uma_name.c_str(), time); | 1726 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1715 } | 1727 } |
| 1716 #endif | 1728 #endif |
| 1717 #endif | 1729 #endif |
| 1718 } | 1730 } |
| OLD | NEW |