Chromium Code Reviews| 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 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1463 return true; | 1463 return true; |
| 1464 #endif | 1464 #endif |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 void ChromeBrowserMainParts::PostMainMessageLoopRun() { | 1467 void ChromeBrowserMainParts::PostMainMessageLoopRun() { |
| 1468 #if defined(OS_ANDROID) | 1468 #if defined(OS_ANDROID) |
| 1469 // Chrome on Android does not use default MessageLoop. It has its own | 1469 // Chrome on Android does not use default MessageLoop. It has its own |
| 1470 // Android specific MessageLoop | 1470 // Android specific MessageLoop |
| 1471 NOTREACHED(); | 1471 NOTREACHED(); |
| 1472 #else | 1472 #else |
| 1473 | |
| 1474 #if defined(USE_X11) | |
| 1475 // Unset the X11 error handlers. The X11 error handlers log the errors using a | |
| 1476 // |PostTask()| on the message-loop. But since the message-loop is in the | |
| 1477 // process of terminating, this can cause errors. | |
| 1478 UnsetBrowserX11ErrorHandlers(); | |
|
sadrul
2012/09/16 16:32:33
I considered doing this from ChromeBrowserMainPart
| |
| 1479 #endif | |
| 1480 | |
| 1473 // Start watching for jank during shutdown. It gets disarmed when | 1481 // Start watching for jank during shutdown. It gets disarmed when |
| 1474 // |shutdown_watcher_| object is destructed. | 1482 // |shutdown_watcher_| object is destructed. |
| 1475 shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300)); | 1483 shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300)); |
| 1476 | 1484 |
| 1477 // Disarm the startup hang detector time bomb if it is still Arm'ed. | 1485 // Disarm the startup hang detector time bomb if it is still Arm'ed. |
| 1478 startup_watcher_->Disarm(); | 1486 startup_watcher_->Disarm(); |
| 1479 | 1487 |
| 1480 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1488 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 1481 chrome_extra_parts_[i]->PostMainMessageLoopRun(); | 1489 chrome_extra_parts_[i]->PostMainMessageLoopRun(); |
| 1482 | 1490 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1587 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1595 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1588 uma_name += "_XP"; | 1596 uma_name += "_XP"; |
| 1589 | 1597 |
| 1590 uma_name += "_PreRead_"; | 1598 uma_name += "_PreRead_"; |
| 1591 uma_name += pre_read_percentage; | 1599 uma_name += pre_read_percentage; |
| 1592 AddPreReadHistogramTime(uma_name.c_str(), time); | 1600 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1593 } | 1601 } |
| 1594 #endif | 1602 #endif |
| 1595 #endif | 1603 #endif |
| 1596 } | 1604 } |
| OLD | NEW |