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

Side by Side Diff: components/filesystem/files_test_base.cc

Issue 1176653002: mandoline filesystem: add a sqlite3 vfs to proxy filesystem usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT and fix the test import. Created 5 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/filesystem/files_test_base.h" 5 #include "components/filesystem/files_test_base.h"
6 6
7 #include "components/filesystem/public/interfaces/directory.mojom.h" 7 #include "components/filesystem/public/interfaces/directory.mojom.h"
8 #include "components/filesystem/public/interfaces/types.mojom.h" 8 #include "components/filesystem/public/interfaces/types.mojom.h"
9 #include "mojo/application/public/cpp/application_impl.h" 9 #include "mojo/application/public/cpp/application_impl.h"
10 #include "mojo/util/capture_util.h"
10 11
11 namespace filesystem { 12 namespace filesystem {
12 13
13 FilesTestBase::FilesTestBase() { 14 FilesTestBase::FilesTestBase() {
14 } 15 }
15 16
16 FilesTestBase::~FilesTestBase() { 17 FilesTestBase::~FilesTestBase() {
17 } 18 }
18 19
19 void FilesTestBase::SetUp() { 20 void FilesTestBase::SetUp() {
20 ApplicationTestBase::SetUp(); 21 ApplicationTestBase::SetUp();
21 22
22 mojo::URLRequestPtr request(mojo::URLRequest::New()); 23 mojo::URLRequestPtr request(mojo::URLRequest::New());
23 request->url = mojo::String::From("mojo:filesystem"); 24 request->url = mojo::String::From("mojo:filesystem");
24 application_impl()->ConnectToService(request.Pass(), &files_); 25 application_impl()->ConnectToService(request.Pass(), &files_);
25 } 26 }
26 27
27 void FilesTestBase::GetTemporaryRoot(DirectoryPtr* directory) { 28 void FilesTestBase::GetTemporaryRoot(DirectoryPtr* directory) {
28 FileError error = FILE_ERROR_FAILED; 29 FileError error = FILE_ERROR_FAILED;
29 files()->OpenFileSystem("temp", GetProxy(directory), Capture(&error)); 30 files()->OpenFileSystem("temp", GetProxy(directory), mojo::Capture(&error));
30 ASSERT_TRUE(files().WaitForIncomingResponse()); 31 ASSERT_TRUE(files().WaitForIncomingResponse());
31 ASSERT_EQ(FILE_ERROR_OK, error); 32 ASSERT_EQ(FILE_ERROR_OK, error);
32 } 33 }
33 34
34 } // namespace filesystem 35 } // namespace filesystem
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698