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

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

Issue 2172863002: [IndexedDB]: Passing URLRequestContextGetter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few missed merge conflicts. Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 class DiskFullFactory : public IndexedDBFactoryImpl { 206 class DiskFullFactory : public IndexedDBFactoryImpl {
207 public: 207 public:
208 explicit DiskFullFactory(IndexedDBContextImpl* context) 208 explicit DiskFullFactory(IndexedDBContextImpl* context)
209 : IndexedDBFactoryImpl(context) {} 209 : IndexedDBFactoryImpl(context) {}
210 210
211 private: 211 private:
212 ~DiskFullFactory() override {} 212 ~DiskFullFactory() override {}
213 scoped_refptr<IndexedDBBackingStore> OpenBackingStore( 213 scoped_refptr<IndexedDBBackingStore> OpenBackingStore(
214 const Origin& origin, 214 const Origin& origin,
215 const base::FilePath& data_directory, 215 const base::FilePath& data_directory,
216 net::URLRequestContext* request_context, 216 scoped_refptr<net::URLRequestContextGetter> request_context_getter,
217 IndexedDBDataLossInfo* data_loss_info, 217 IndexedDBDataLossInfo* data_loss_info,
218 bool* disk_full, 218 bool* disk_full,
219 leveldb::Status* s) override { 219 leveldb::Status* s) override {
220 *disk_full = true; 220 *disk_full = true;
221 *s = leveldb::Status::IOError("Disk is full"); 221 *s = leveldb::Status::IOError("Disk is full");
222 return scoped_refptr<IndexedDBBackingStore>(); 222 return scoped_refptr<IndexedDBBackingStore>();
223 } 223 }
224 224
225 DISALLOW_COPY_AND_ASSIGN(DiskFullFactory); 225 DISALLOW_COPY_AND_ASSIGN(DiskFullFactory);
226 }; 226 };
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 temp_directory.path()); 499 temp_directory.path());
500 EXPECT_TRUE(callbacks->saw_error()); 500 EXPECT_TRUE(callbacks->saw_error());
501 EXPECT_FALSE(factory()->IsDatabaseOpen(origin, db_name)); 501 EXPECT_FALSE(factory()->IsDatabaseOpen(origin, db_name));
502 } 502 }
503 503
504 // Terminate all pending-close timers. 504 // Terminate all pending-close timers.
505 factory()->ForceClose(origin); 505 factory()->ForceClose(origin);
506 } 506 }
507 507
508 } // namespace content 508 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_factory_impl.cc ('k') | content/browser/indexed_db/indexed_db_fake_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698