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

Unified Diff: components/sync/core/sync_db_util.cc

Issue 2413313004: [Sync] Move the last things out of core/. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/core/sync_auth_provider.h ('k') | components/sync/core/sync_encryption_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/core/sync_db_util.cc
diff --git a/components/sync/core/sync_db_util.cc b/components/sync/core/sync_db_util.cc
deleted file mode 100644
index 15af7e3a418e33de8f3d02e07d04b9dfa2604ea9..0000000000000000000000000000000000000000
--- a/components/sync/core/sync_db_util.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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 "components/sync/base/sync_db_util.h"
-
-#include "base/files/file_path.h"
-#include "base/single_thread_task_runner.h"
-#include "components/sync/syncable/directory.h"
-#include "sql/connection.h"
-
-namespace syncer {
-
-void CheckSyncDbLastModifiedTime(
- const base::FilePath& sync_dir,
- scoped_refptr<base::SingleThreadTaskRunner> callback_runner,
- base::Callback<void(base::Time)> callback) {
- const base::FilePath sync_db =
- sync_dir.Append(syncable::Directory::kSyncDatabaseFilename);
-
- base::File f(sync_db, base::File::FLAG_OPEN | base::File::FLAG_READ);
- base::File::Info info;
- if (!f.IsValid() || !f.GetInfo(&info)) {
- callback_runner->PostTask(FROM_HERE, base::Bind(callback, base::Time()));
- return;
- }
- f.Close();
-
- sql::Connection db;
- if (!db.Open(sync_db) || !db.QuickIntegrityCheck()) {
- callback_runner->PostTask(FROM_HERE, base::Bind(callback, base::Time()));
- } else {
- callback_runner->PostTask(FROM_HERE,
- base::Bind(callback, info.last_modified));
- }
-}
-
-} // namespace syncer
« no previous file with comments | « components/sync/core/sync_auth_provider.h ('k') | components/sync/core/sync_encryption_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698