install_warning.cc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2013 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. #include "extensions/common/install_warning.h"
  5. namespace extensions {
  6. InstallWarning::InstallWarning(const std::string& message) : message(message) {
  7. }
  8. InstallWarning::InstallWarning(const std::string& message,
  9. const std::string& key)
  10. : message(message), key(key) {
  11. }
  12. InstallWarning::InstallWarning(const std::string& message,
  13. const std::string& key,
  14. const std::string& specific)
  15. : message(message), key(key), specific(specific) {
  16. }
  17. InstallWarning::InstallWarning(InstallWarning&& other) = default;
  18. InstallWarning& InstallWarning::operator=(InstallWarning&& other) = default;
  19. InstallWarning::~InstallWarning() {
  20. }
  21. void PrintTo(const InstallWarning& warning, ::std::ostream* os) {
  22. // This is just for test error messages, so no need to escape '"'
  23. // characters inside the message.
  24. *os << "InstallWarning(\"" << warning.message << "\")";
  25. }
  26. } // namespace extensions