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

Side by Side Diff: extensions/browser/api/storage/leveldb_settings_storage_factory.cc

Issue 558833002: Cleanup: Use base/files/file_util.h instead of base/file_util.h in apps/ and extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « apps/launcher.cc ('k') | extensions/browser/api/storage/storage_frontend_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/storage/leveldb_settings_storage_factory.h" 5 #include "extensions/browser/api/storage/leveldb_settings_storage_factory.h"
6 6
7 #include "base/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "extensions/browser/value_store/leveldb_value_store.h" 9 #include "extensions/browser/value_store/leveldb_value_store.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 namespace { 13 namespace {
14 14
15 base::FilePath GetDatabasePath(const base::FilePath& base_path, 15 base::FilePath GetDatabasePath(const base::FilePath& base_path,
16 const std::string& extension_id) { 16 const std::string& extension_id) {
17 return base_path.AppendASCII(extension_id); 17 return base_path.AppendASCII(extension_id);
18 } 18 }
19 19
20 } // namespace 20 } // namespace
21 21
22 ValueStore* LeveldbSettingsStorageFactory::Create( 22 ValueStore* LeveldbSettingsStorageFactory::Create(
23 const base::FilePath& base_path, 23 const base::FilePath& base_path,
24 const std::string& extension_id) { 24 const std::string& extension_id) {
25 return new LeveldbValueStore(GetDatabasePath(base_path, extension_id)); 25 return new LeveldbValueStore(GetDatabasePath(base_path, extension_id));
26 } 26 }
27 27
28 void LeveldbSettingsStorageFactory::DeleteDatabaseIfExists( 28 void LeveldbSettingsStorageFactory::DeleteDatabaseIfExists(
29 const base::FilePath& base_path, 29 const base::FilePath& base_path,
30 const std::string& extension_id) { 30 const std::string& extension_id) {
31 base::FilePath path = GetDatabasePath(base_path, extension_id); 31 base::FilePath path = GetDatabasePath(base_path, extension_id);
32 if (base::PathExists(path)) 32 if (base::PathExists(path))
33 base::DeleteFile(path, true /* recursive */); 33 base::DeleteFile(path, true /* recursive */);
34 } 34 }
35 35
36 } // namespace extensions 36 } // namespace extensions
OLDNEW
« no previous file with comments | « apps/launcher.cc ('k') | extensions/browser/api/storage/storage_frontend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698