OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile.h" | 5 #include "chrome/browser/profile.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/env_var.h" | 10 #include "base/env_var.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 ChromeThread::PostTask( | 162 ChromeThread::PostTask( |
163 ChromeThread::IO, FROM_HERE, | 163 ChromeThread::IO, FROM_HERE, |
164 NewRunnableMethod(getter, | 164 NewRunnableMethod(getter, |
165 &ChromeURLRequestContextGetter::OnUnloadedExtension, | 165 &ChromeURLRequestContextGetter::OnUnloadedExtension, |
166 extension->id())); | 166 extension->id())); |
167 } | 167 } |
168 | 168 |
169 // Returns true if the default apps should be loaded (so that the app panel is | 169 // Returns true if the default apps should be loaded (so that the app panel is |
170 // not empty). | 170 // not empty). |
171 bool IncludeDefaultApps() { | 171 bool IncludeDefaultApps() { |
172 #if defined(OS_WIN) | 172 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) |
173 std::string user_domain; | |
174 return base::EnvVarGetter::Create()->GetEnv("USERDOMAIN", &user_domain) && | |
175 user_domain == "GOOGLE"; | |
176 #elif defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) | |
177 return true; | 173 return true; |
178 #endif | 174 #endif |
179 return false; | 175 return false; |
180 } | 176 } |
181 | 177 |
182 // Simple task to log the size of the current profile. | 178 // Simple task to log the size of the current profile. |
183 class ProfileSizeTask : public Task { | 179 class ProfileSizeTask : public Task { |
184 public: | 180 public: |
185 explicit ProfileSizeTask(const FilePath& path) : path_(path) {} | 181 explicit ProfileSizeTask(const FilePath& path) : path_(path) {} |
186 virtual ~ProfileSizeTask() {} | 182 virtual ~ProfileSizeTask() {} |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 new ProfileSyncFactoryImpl(this, CommandLine::ForCurrentProcess())); | 1661 new ProfileSyncFactoryImpl(this, CommandLine::ForCurrentProcess())); |
1666 sync_service_.reset( | 1662 sync_service_.reset( |
1667 profile_sync_factory_->CreateProfileSyncService()); | 1663 profile_sync_factory_->CreateProfileSyncService()); |
1668 sync_service_->Initialize(); | 1664 sync_service_->Initialize(); |
1669 } | 1665 } |
1670 | 1666 |
1671 void ProfileImpl::InitCloudPrintProxyService() { | 1667 void ProfileImpl::InitCloudPrintProxyService() { |
1672 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); | 1668 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); |
1673 cloud_print_proxy_service_->Initialize(); | 1669 cloud_print_proxy_service_->Initialize(); |
1674 } | 1670 } |
OLD | NEW |