forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not fetch PVer4 updates when kDisableBackgroundNetworking is enabled
BUG=543161 Committed: https://crrev.com/deb2664a830bfedadc7b37b7954756aafaf0c396 Review-Url: https://codereview.chromium.org/2472903004 Cr-Original-Commit-Position: refs/heads/master@{#430365} Cr-Commit-Position: refs/heads/master@{#431404}
- Loading branch information
Showing
17 changed files
with
153 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "components/safe_browsing_db/util.h" | ||
#include "components/safe_browsing_db/v4_test_util.h" | ||
|
||
namespace safe_browsing { | ||
|
||
namespace { | ||
|
||
const char kClient[] = "unittest"; | ||
const char kAppVer[] = "1.0"; | ||
const char kKeyParam[] = "test_key_param"; | ||
|
||
} // namespace | ||
|
||
V4ProtocolConfig GetTestV4ProtocolConfig(bool disable_auto_update) { | ||
return V4ProtocolConfig(kClient, disable_auto_update, kKeyParam, kAppVer); | ||
} | ||
|
||
std::ostream& operator<<(std::ostream& os, const ThreatMetadata& meta) { | ||
os << "{threat_pattern_type=" << static_cast<int>(meta.threat_pattern_type) | ||
<< ", api_permissions=["; | ||
for (auto p : meta.api_permissions) | ||
os << p << ","; | ||
return os << "], population_id=" << meta.population_id << "}"; | ||
} | ||
|
||
} // namespace safe_browsing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef COMPONENTS_SAFE_BROWSING_DB_V4_TEST_UTIL_H_ | ||
#define COMPONENTS_SAFE_BROWSING_DB_V4_TEST_UTIL_H_ | ||
|
||
// Contains methods useful for tests. | ||
|
||
#include <ostream> | ||
|
||
namespace safe_browsing { | ||
|
||
struct ThreatMetadata; | ||
struct V4ProtocolConfig; | ||
|
||
V4ProtocolConfig GetTestV4ProtocolConfig(bool disable_auto_update = false); | ||
|
||
std::ostream& operator<<(std::ostream& os, const ThreatMetadata& meta); | ||
|
||
} // namespace safe_browsing | ||
|
||
#endif // COMPONENTS_SAFE_BROWSING_DB_V4_TEST_UTIL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.