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

Side by Side Diff: chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc

Issue 16043006: Rename FileSystemMountPointProvider::ValidateFileSystemRoot to OpenFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h" 5 #include "chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return; 153 return;
154 } 154 }
155 155
156 BrowserThread::PostTask( 156 BrowserThread::PostTask(
157 BrowserThread::IO, FROM_HERE, 157 BrowserThread::IO, FROM_HERE,
158 Bind(&fileapi::FileSystemContext::OpenSyncableFileSystem, 158 Bind(&fileapi::FileSystemContext::OpenSyncableFileSystem,
159 GetFileSystemContext(), 159 GetFileSystemContext(),
160 service_name, 160 service_name,
161 source_url().GetOrigin(), 161 source_url().GetOrigin(),
162 fileapi::kFileSystemTypeSyncable, 162 fileapi::kFileSystemTypeSyncable,
163 true, /* create */ 163 fileapi::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
164 base::Bind(&self::DidOpenFileSystem, this))); 164 base::Bind(&self::DidOpenFileSystem, this)));
165 } 165 }
166 166
167 void SyncFileSystemRequestFileSystemFunction::DidOpenFileSystem( 167 void SyncFileSystemRequestFileSystemFunction::DidOpenFileSystem(
168 base::PlatformFileError error, 168 base::PlatformFileError error,
169 const std::string& file_system_name, 169 const std::string& file_system_name,
170 const GURL& root_url) { 170 const GURL& root_url) {
171 // Repost to switch from IO thread to UI thread for SendResponse(). 171 // Repost to switch from IO thread to UI thread for SendResponse().
172 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { 172 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 DCHECK(service); 393 DCHECK(service);
394 api::sync_file_system::ConflictResolutionPolicy policy = 394 api::sync_file_system::ConflictResolutionPolicy policy =
395 ConflictResolutionPolicyToExtensionEnum( 395 ConflictResolutionPolicyToExtensionEnum(
396 service->GetConflictResolutionPolicy()); 396 service->GetConflictResolutionPolicy());
397 SetResult(Value::CreateStringValue( 397 SetResult(Value::CreateStringValue(
398 api::sync_file_system::ToString(policy))); 398 api::sync_file_system::ToString(policy)));
399 return true; 399 return true;
400 } 400 }
401 401
402 } // namespace extensions 402 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698