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

Side by Side Diff: webkit/fileapi/file_system_origin_database.cc

Issue 7522008: Move chromium-specific files from leveldb to chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: change parameter to const ref Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/file_system_origin_database.h ('k') | webkit/fileapi/webkit_fileapi.gypi » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/fileapi/file_system_origin_database.h" 5 #include "webkit/fileapi/file_system_origin_database.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
13 #include "third_party/leveldb/include/leveldb/iterator.h" 13 #include "third_party/leveldatabase/src/include/leveldb/iterator.h"
14 #include "third_party/leveldb/include/leveldb/write_batch.h" 14 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
15 15
16 namespace { 16 namespace {
17 17
18 const char kOriginKeyPrefix[] = "ORIGIN:"; 18 const char kOriginKeyPrefix[] = "ORIGIN:";
19 const char kLastPathKey[] = "LAST_PATH"; 19 const char kLastPathKey[] = "LAST_PATH";
20 20
21 std::string OriginToOriginKey(const std::string& origin) { 21 std::string OriginToOriginKey(const std::string& origin) {
22 std::string key(kOriginKeyPrefix); 22 std::string key(kOriginKeyPrefix);
23 return key + origin; 23 return key + origin;
24 } 24 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 db_->Put(leveldb::WriteOptions(), LastPathKey(), std::string("-1")); 194 db_->Put(leveldb::WriteOptions(), LastPathKey(), std::string("-1"));
195 if (!status.ok()) { 195 if (!status.ok()) {
196 HandleError(status); 196 HandleError(status);
197 return false; 197 return false;
198 } 198 }
199 *number = -1; 199 *number = -1;
200 return true; 200 return true;
201 } 201 }
202 202
203 } // namespace fileapi 203 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_origin_database.h ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698