summaryrefslogtreecommitdiffstats
path: root/storage/browser/blob/file_stream_reader.cc
blob: 5c4aaa28eba161f8885f30bfcad0c292a1c0f3e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2014 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 "storage/browser/blob/file_stream_reader.h"

#include "base/time/time.h"

namespace storage {

// Verify if the underlying file has not been modified.
bool FileStreamReader::VerifySnapshotTime(
    const base::Time& expected_modification_time,
    const base::File::Info& file_info) {
  return expected_modification_time.is_null() ||
         expected_modification_time.ToTimeT() ==
             file_info.last_modified.ToTimeT();
}

}  // namespace storage