Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: components/safe_browsing_db/v4_protocol_manager_util.cc

Issue 2356443002: Set client_id and client_version in requests sent to SafeBrowsing (Closed)
Patch Set: Make GetBase64SerializedUpdateRequestProto non static Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/safe_browsing_db/v4_protocol_manager_util.h" 5 #include "components/safe_browsing_db/v4_protocol_manager_util.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 paths->push_back(std::string(path.begin(), i + 1)); 489 paths->push_back(std::string(path.begin(), i + 1));
490 } 490 }
491 491
492 if (!paths->empty() && paths->back() != path) 492 if (!paths->empty() && paths->back() != path)
493 paths->push_back(path); 493 paths->push_back(path);
494 494
495 if (!query.empty()) 495 if (!query.empty())
496 paths->push_back(path + "?" + query); 496 paths->push_back(path + "?" + query);
497 } 497 }
498 498
499 // static
500 void V4ProtocolManagerUtil::SetClientInfoFromConfig(
501 ClientInfo* client_info,
502 const V4ProtocolConfig& config) {
503 DCHECK(client_info);
504 client_info->set_client_id(config.client_name);
505 client_info->set_client_version(config.version);
506 }
507
499 } // namespace safe_browsing 508 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_protocol_manager_util.h ('k') | components/safe_browsing_db/v4_update_protocol_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698