summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/chromeos/system/name_value_pairs_parser.cc2
-rw-r--r--chrome/browser/chromeos/system/statistics_provider.cc36
2 files changed, 6 insertions, 32 deletions
diff --git a/chrome/browser/chromeos/system/name_value_pairs_parser.cc b/chrome/browser/chromeos/system/name_value_pairs_parser.cc
index 3c2c3c8..16a6bad 100644
--- a/chrome/browser/chromeos/system/name_value_pairs_parser.cc
+++ b/chrome/browser/chromeos/system/name_value_pairs_parser.cc
@@ -74,7 +74,7 @@ bool NameValuePairsParser::GetSingleValueFromTool(int argc,
// TODO(stevenjb,satorux): Make this non blocking: crosbug.com/5603.
base::ThreadRestrictions::ScopedAllowIO allow_io_for_thread_join;
if (!file_util::PathExists(FilePath(argv[0]))) {
- LOG(ERROR) << argv[0] << " not found";
+ LOG(WARNING) << argv[0] << " not found. Maybe running on Linux desktop?";
return false;
}
diff --git a/chrome/browser/chromeos/system/statistics_provider.cc b/chrome/browser/chromeos/system/statistics_provider.cc
index 516465b..f863c1f 100644
--- a/chrome/browser/chromeos/system/statistics_provider.cc
+++ b/chrome/browser/chromeos/system/statistics_provider.cc
@@ -7,7 +7,6 @@
#include "base/memory/singleton.h"
#include "base/task.h"
#include "chrome/browser/chromeos/system/name_value_pairs_parser.h"
-#include "chrome/browser/chromeos/system/runtime_environment.h"
namespace chromeos {
namespace system {
@@ -39,7 +38,6 @@ const char kVpdDelim[] = "\n";
} // namespace
-// The StatisticsProvider implementation used in production.
class StatisticsProviderImpl : public StatisticsProvider {
public:
// StatisticsProvider implementation:
@@ -101,37 +99,13 @@ StatisticsProviderImpl* StatisticsProviderImpl::GetInstance() {
DefaultSingletonTraits<StatisticsProviderImpl> >::get();
}
-// The stub StatisticsProvider implementation used on Linux desktop.
-class StatisticsProviderStubImpl : public StatisticsProvider {
- public:
- // StatisticsProvider implementation:
- virtual bool GetMachineStatistic(const std::string& name,
- std::string* result) {
- *result = "stub statistic for " + name;
- return true;
- }
-
- static StatisticsProviderStubImpl* GetInstance() {
- return Singleton<StatisticsProviderStubImpl,
- DefaultSingletonTraits<StatisticsProviderStubImpl> >::get();
- }
-
- private:
- friend struct DefaultSingletonTraits<StatisticsProviderStubImpl>;
-
- StatisticsProviderStubImpl() {
- }
-
- DISALLOW_COPY_AND_ASSIGN(StatisticsProviderStubImpl);
-};
-
StatisticsProvider* StatisticsProvider::GetInstance() {
- if (system::runtime_environment::IsRunningOnChromeOS()) {
- return StatisticsProviderImpl::GetInstance();
- } else {
- return StatisticsProviderStubImpl::GetInstance();
- }
+ return StatisticsProviderImpl::GetInstance();
}
} // namespace system
} // namespace chromeos
+
+// Allows InvokeLater without adding refcounting. StatisticsProviderImpl is a
+// Singleton and won't be deleted until it's last InvokeLater is run.
+DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::system::StatisticsProviderImpl);