Skip to content

Commit c71d4d3

Browse files
committed
Style
1 parent fb33aca commit c71d4d3

File tree

6 files changed

+24
-28
lines changed

6 files changed

+24
-28
lines changed

Firestore/core/src/local/globals_cache.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ using nanopb::ByteString;
2929
/**
3030
* General purpose cache for global values.
3131
*
32-
* Global state that cuts across components should be saved here. Following are contained herein:
32+
* Global state that cuts across components should be saved here. Following are
33+
* contained herein:
3334
*
34-
* `sessionToken` tracks server interaction across Listen and Write streams. This facilitates cache
35-
* synchronization and invalidation.
35+
* `sessionToken` tracks server interaction across Listen and Write streams.
36+
* This facilitates cache synchronization and invalidation.
3637
*/
3738
class GlobalsCache {
3839
public:
@@ -47,7 +48,6 @@ class GlobalsCache {
4748
* Sets session token.
4849
*/
4950
virtual void SetSessionToken(const ByteString& session_token) = 0;
50-
5151
};
5252

5353
} // namespace local

Firestore/core/src/local/leveldb_globals_cache.h

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
* Copyright 2024 Google LLC
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
#ifndef FIRESTORE_CORE_SRC_LOCAL_LEVELDB_GLOBALS_CACHE_H
1818
#define FIRESTORE_CORE_SRC_LOCAL_LEVELDB_GLOBALS_CACHE_H
@@ -40,11 +40,9 @@ class LevelDbGlobalsCache : public GlobalsCache {
4040
*/
4141
void SetSessionToken(const ByteString& session_token) override;
4242

43-
4443
private:
4544
// The LevelDbGlobalsCache is owned by LevelDbPersistence.
4645
LevelDbPersistence* db_ = nullptr;
47-
4846
};
4947

5048
} // namespace local

Firestore/core/src/local/leveldb_persistence.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <unordered_map>
2424

2525
#include "Firestore/core/src/credentials/user.h"
26-
#include "Firestore/core/src/local/leveldb_globals_cache.h"
2726
#include "Firestore/core/src/local/leveldb_bundle_cache.h"
2827
#include "Firestore/core/src/local/leveldb_document_overlay_cache.h"
2928
#include "Firestore/core/src/local/leveldb_globals_cache.h"

Firestore/core/src/local/memory_globals_cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ namespace local {
2828

2929
class MemoryGlobalsCache : public GlobalsCache {
3030
public:
31-
3231
/**
3332
* Gets session token.
3433
*/

Firestore/core/test/unit/local/globals_cache_test.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ GlobalsCacheTest::GlobalsCacheTest() : GlobalsCacheTest(GetParam()()) {
3636
namespace {
3737

3838
TEST_P(GlobalsCacheTest, ReturnsEmptyBytestringWhenSessionTokenNotFound) {
39-
persistence_->Run("test_returns_empty_bytestring_when_session_token_not_found", [&] {
40-
auto expected = ByteString();
41-
EXPECT_EQ(cache_->GetSessionToken(), expected);
42-
});
39+
persistence_->Run(
40+
"test_returns_empty_bytestring_when_session_token_not_found", [&] {
41+
auto expected = ByteString();
42+
EXPECT_EQ(cache_->GetSessionToken(), expected);
43+
});
4344
}
4445

4546
TEST_P(GlobalsCacheTest, ReturnsSavedSessionToken) {
@@ -59,7 +60,7 @@ TEST_P(GlobalsCacheTest, ReturnsSavedSessionToken) {
5960
});
6061
}
6162

62-
}
63+
} // namespace
6364

6465
} // namespace local
6566
} // namespace firestore

Firestore/core/test/unit/local/globals_cache_test.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
1817
#ifndef FIRESTORE_CORE_TEST_UNIT_LOCAL_GLOBALS_CACHE_TEST_H
1918
#define FIRESTORE_CORE_TEST_UNIT_LOCAL_GLOBALS_CACHE_TEST_H
2019

0 commit comments

Comments
 (0)