File tree Expand file tree Collapse file tree 6 files changed +69
-8
lines changed
Expand file tree Collapse file tree 6 files changed +69
-8
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ cc_test(
5858 deps = [
5959 ":include14" ,
6060 "@com_google_absl//absl/base" ,
61- "@com_google_absl//absl/strings:strings " ,
61+ "@com_google_absl//absl/strings" ,
6262 "@com_google_absl//absl/types:optional" ,
6363 "@com_google_googletest//:gtest" ,
6464 "@com_google_googletest//:gtest_main" ,
@@ -72,7 +72,7 @@ cc_test(
7272 deps = [
7373 ":include14" ,
7474 "@com_google_absl//absl/base" ,
75- "@com_google_absl//absl/strings:strings " ,
75+ "@com_google_absl//absl/strings" ,
7676 "@com_google_absl//absl/types:optional" ,
7777 "@com_google_googletest//:gtest" ,
7878 "@com_google_googletest//:gtest_main" ,
Original file line number Diff line number Diff line change 1+ // Copyright 2020 Google LLC
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
115#include " include/proxy-wasm/context.h"
216
317#include " gtest/gtest.h"
Original file line number Diff line number Diff line change @@ -92,11 +92,13 @@ class ContextBase {
9292
9393 WasmBase *wasm () const { return wasm_; }
9494 uint32_t id () const { return id_; }
95- bool isVmContext () { return id_ == 0 ; }
96- bool isRootContext () { return root_context_id_ == 0 ; }
95+ bool isVmContext () const { return id_ == 0 ; }
96+ bool isRootContext () const { return root_context_id_ == 0 ; }
9797 ContextBase *root_context () { return root_context_; }
98- string_view root_id () const { return plugin_->root_id_ ; }
99- string_view log_prefix () const { return plugin_->log_prefix (); }
98+ string_view root_id () const { return isRootContext () ? root_id_ : plugin_->root_id_ ; }
99+ string_view log_prefix () const {
100+ return isRootContext () ? root_log_prefix_ : plugin_->log_prefix ();
101+ }
100102 WasmVm *wasmVm () const ;
101103
102104 // Called before deleting the context.
Original file line number Diff line number Diff line change 1- // Public Domain: https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64
1+ // Copyright 2020 Google LLC
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ // Original source Public Domain:
16+ // https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64
217#include " base64.h"
318
419const static char encodeLookup[] =
Original file line number Diff line number Diff line change 1- // Public Domain: https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64
1+ // Copyright 2020 Google LLC
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ // Original source Public Domain:
16+ // https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64
17+
218#pragma once
319
420#include < cstdint>
Original file line number Diff line number Diff line change 1+ // Copyright 2020 Google LLC
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
115#include " include/proxy-wasm/wasm_vm.h"
216
317#include " gtest/gtest.h"
You can’t perform that action at this time.
0 commit comments