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

Side by Side Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/indexed_db/indexed_db_backing_store.h" 5 #include "content/browser/indexed_db/indexed_db_backing_store.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 *data_loss = blink::WebIDBDataLossNone; 506 *data_loss = blink::WebIDBDataLossNone;
507 *data_loss_message = ""; 507 *data_loss_message = "";
508 *is_disk_full = false; 508 *is_disk_full = false;
509 509
510 scoped_ptr<LevelDBComparator> comparator(new Comparator()); 510 scoped_ptr<LevelDBComparator> comparator(new Comparator());
511 511
512 if (!IsStringASCII(path_base.AsUTF8Unsafe())) { 512 if (!IsStringASCII(path_base.AsUTF8Unsafe())) {
513 HistogramOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_ATTEMPT_NON_ASCII, 513 HistogramOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_ATTEMPT_NON_ASCII,
514 origin_url); 514 origin_url);
515 } 515 }
516 if (!file_util::CreateDirectory(path_base)) { 516 if (!base::CreateDirectory(path_base)) {
517 LOG(ERROR) << "Unable to create IndexedDB database path " 517 LOG(ERROR) << "Unable to create IndexedDB database path "
518 << path_base.AsUTF8Unsafe(); 518 << path_base.AsUTF8Unsafe();
519 HistogramOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_FAILED_DIRECTORY, 519 HistogramOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_FAILED_DIRECTORY,
520 origin_url); 520 origin_url);
521 return scoped_refptr<IndexedDBBackingStore>(); 521 return scoped_refptr<IndexedDBBackingStore>();
522 } 522 }
523 523
524 const base::FilePath file_path = 524 const base::FilePath file_path =
525 path_base.Append(ComputeFileName(origin_url)); 525 path_base.Append(ComputeFileName(origin_url));
526 526
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 } 2605 }
2606 2606
2607 void IndexedDBBackingStore::Transaction::Rollback() { 2607 void IndexedDBBackingStore::Transaction::Rollback() {
2608 IDB_TRACE("IndexedDBBackingStore::Transaction::Rollback"); 2608 IDB_TRACE("IndexedDBBackingStore::Transaction::Rollback");
2609 DCHECK(transaction_.get()); 2609 DCHECK(transaction_.get());
2610 transaction_->Rollback(); 2610 transaction_->Rollback();
2611 transaction_ = NULL; 2611 transaction_ = NULL;
2612 } 2612 }
2613 2613
2614 } // namespace content 2614 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/obfuscated_file_util_unittest.cc ('k') | content/browser/indexed_db/indexed_db_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698