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

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

Issue 2126373002: Tiny: Fix 626411: Use PRIsFP macro instead of %s for path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/base64.h" 5 #include "base/base64.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/metrics/sparse_histogram.h" 9 #include "base/metrics/sparse_histogram.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 V4Store::V4Store(const scoped_refptr<base::SequencedTaskRunner>& task_runner, 60 V4Store::V4Store(const scoped_refptr<base::SequencedTaskRunner>& task_runner,
61 const base::FilePath& store_path) 61 const base::FilePath& store_path)
62 : store_path_(store_path), task_runner_(task_runner) {} 62 : store_path_(store_path), task_runner_(task_runner) {}
63 63
64 V4Store::~V4Store() {} 64 V4Store::~V4Store() {}
65 65
66 std::string V4Store::DebugString() const { 66 std::string V4Store::DebugString() const {
67 std::string state_base64; 67 std::string state_base64;
68 base::Base64Encode(state_, &state_base64); 68 base::Base64Encode(state_, &state_base64);
69 69
70 return base::StringPrintf("path: %s; state: %s", store_path_.value().c_str(), 70 return base::StringPrintf("path: %" PRIsFP "; state: %s",
71 state_base64.c_str()); 71 store_path_.value().c_str(), state_base64.c_str());
72 } 72 }
73 73
74 bool V4Store::Reset() { 74 bool V4Store::Reset() {
75 // TODO(vakh): Implement skeleton. 75 // TODO(vakh): Implement skeleton.
76 state_ = ""; 76 state_ = "";
77 return true; 77 return true;
78 } 78 }
79 79
80 void V4Store::ApplyUpdate( 80 void V4Store::ApplyUpdate(
81 std::unique_ptr<ListUpdateResponse> response, 81 std::unique_ptr<ListUpdateResponse> response,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 if (!base::Move(new_filename, store_path_)) { 175 if (!base::Move(new_filename, store_path_)) {
176 DVLOG(1) << "store_path_: " << store_path_.value(); 176 DVLOG(1) << "store_path_: " << store_path_.value();
177 return UNABLE_TO_RENAME_FAILURE; 177 return UNABLE_TO_RENAME_FAILURE;
178 } 178 }
179 179
180 return WRITE_SUCCESS; 180 return WRITE_SUCCESS;
181 } 181 }
182 182
183 } // namespace safe_browsing 183 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698