xref: /aosp_15_r20/external/cronet/net/base/privacy_mode.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "net/base/privacy_mode.h"
6 
7 #include "base/notreached.h"
8 
9 namespace net {
10 
PrivacyModeToDebugString(PrivacyMode privacy_mode)11 const char* PrivacyModeToDebugString(PrivacyMode privacy_mode) {
12   switch (privacy_mode) {
13     case PRIVACY_MODE_DISABLED:
14       return "disabled";
15     case PRIVACY_MODE_ENABLED:
16       return "enabled";
17     case PRIVACY_MODE_ENABLED_WITHOUT_CLIENT_CERTS:
18       return "enabled without client certs";
19     case PRIVACY_MODE_ENABLED_PARTITIONED_STATE_ALLOWED:
20       return "enabled partitioned state allowed";
21   }
22   NOTREACHED();
23   return "";
24 }
25 
26 }  // namespace net
27