| 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/service_process/service_process_control.h" | 5 #include "chrome/browser/service_process/service_process_control.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 | 275 |
| 276 bool ServiceProcessControl::GetHistograms( | 276 bool ServiceProcessControl::GetHistograms( |
| 277 const base::Closure& histograms_callback, | 277 const base::Closure& histograms_callback, |
| 278 const base::TimeDelta& timeout) { | 278 const base::TimeDelta& timeout) { |
| 279 AllocDebugTest(); | 279 AllocDebugTest(); |
| 280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 281 DCHECK(!histograms_callback.is_null()); | 281 DCHECK(!histograms_callback.is_null()); |
| 282 histograms_callback_.Reset(); | 282 histograms_callback_.Reset(); |
| 283 | 283 |
| 284 #if defined(OS_MACOSX) |
| 285 // TODO(vitalybuka): Investigate why it crashes MAC http://crbug.com/406227. |
| 286 return false; |
| 287 #endif // OS_MACOSX |
| 288 |
| 284 // If the service process is already running then connect to it. | 289 // If the service process is already running then connect to it. |
| 285 if (!CheckServiceProcessReady()) | 290 if (!CheckServiceProcessReady()) |
| 286 return false; | 291 return false; |
| 287 ConnectInternal(); | 292 ConnectInternal(); |
| 288 | 293 |
| 289 UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents", | 294 UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents", |
| 290 SERVICE_EVENT_HISTOGRAMS_REQUEST, | 295 SERVICE_EVENT_HISTOGRAMS_REQUEST, |
| 291 SERVICE_EVENT_MAX); | 296 SERVICE_EVENT_MAX); |
| 292 | 297 |
| 293 if (!Send(new ServiceMsg_GetHistograms())) | 298 if (!Send(new ServiceMsg_GetHistograms())) |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 if (base::LaunchProcess(*cmd_line_, options, &process_handle_)) { | 408 if (base::LaunchProcess(*cmd_line_, options, &process_handle_)) { |
| 404 BrowserThread::PostTask( | 409 BrowserThread::PostTask( |
| 405 BrowserThread::IO, FROM_HERE, | 410 BrowserThread::IO, FROM_HERE, |
| 406 base::Bind(&Launcher::DoDetectLaunched, this)); | 411 base::Bind(&Launcher::DoDetectLaunched, this)); |
| 407 } else { | 412 } else { |
| 408 BrowserThread::PostTask( | 413 BrowserThread::PostTask( |
| 409 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); | 414 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); |
| 410 } | 415 } |
| 411 } | 416 } |
| 412 #endif // !OS_MACOSX | 417 #endif // !OS_MACOSX |
| OLD | NEW |