version_utils.h 924 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_METRICS_VERSION_UTILS_H_
  5. #define COMPONENTS_METRICS_VERSION_UTILS_H_
  6. #include <string>
  7. #include "third_party/metrics_proto/system_profile.pb.h"
  8. namespace version_info {
  9. enum class Channel;
  10. }
  11. namespace metrics {
  12. // Build a string including the Chrome app version, suffixed by "-64" on 64-bit
  13. // platforms, and "-devel" on developer builds.
  14. std::string GetVersionString();
  15. // Translates version_info::Channel to the equivalent
  16. // SystemProfileProto::Channel.
  17. SystemProfileProto::Channel AsProtobufChannel(version_info::Channel channel);
  18. // Gets Chrome's package name in Android Chrome, or an empty string on other
  19. // platforms.
  20. std::string GetAppPackageName();
  21. } // namespace metrics
  22. #endif // COMPONENTS_METRICS_VERSION_UTILS_H_