cookie_change_dispatcher_test_helpers.cc 967 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2018 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 "net/cookies/cookie_change_dispatcher_test_helpers.h"
  5. #include "base/notreached.h"
  6. namespace net {
  7. // Google Test helper.
  8. std::ostream& operator<<(std::ostream& os, const CookieChangeCause& cause) {
  9. switch (cause) {
  10. case CookieChangeCause::INSERTED:
  11. return os << "INSERTED";
  12. case CookieChangeCause::EXPLICIT:
  13. return os << "EXPLICIT";
  14. case CookieChangeCause::UNKNOWN_DELETION:
  15. return os << "UNKNOWN_DELETION";
  16. case CookieChangeCause::OVERWRITE:
  17. return os << "OVERWRITE";
  18. case CookieChangeCause::EXPIRED:
  19. return os << "EXPIRED";
  20. case CookieChangeCause::EVICTED:
  21. return os << "EVICTED";
  22. case CookieChangeCause::EXPIRED_OVERWRITE:
  23. return os << "EXPIRED_OVERWRITE";
  24. }
  25. NOTREACHED();
  26. return os;
  27. }
  28. } // namespace net