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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc

Issue 141473004: Random cleanup for c/b/cros/extensions/file_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 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 "chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 const scoped_refptr<fileapi::FileSystemContext> file_system_context = 74 const scoped_refptr<fileapi::FileSystemContext> file_system_context =
75 file_manager::util::GetFileSystemContextForRenderViewHost( 75 file_manager::util::GetFileSystemContextForRenderViewHost(
76 GetProfile(), render_view_host()); 76 GetProfile(), render_view_host());
77 77
78 std::vector<FileSystemURL> file_urls; 78 std::vector<FileSystemURL> file_urls;
79 for (size_t i = 0; i < params->file_urls.size(); i++) { 79 for (size_t i = 0; i < params->file_urls.size(); i++) {
80 const FileSystemURL url = 80 const FileSystemURL url =
81 file_system_context->CrackURL(GURL(params->file_urls[i])); 81 file_system_context->CrackURL(GURL(params->file_urls[i]));
82 if (!chromeos::FileSystemBackend::CanHandleURL(url)) { 82 if (!chromeos::FileSystemBackend::CanHandleURL(url)) {
83 error_ = kInvalidFileUrl; 83 SetError(kInvalidFileUrl);
84 return false; 84 return false;
85 } 85 }
86 file_urls.push_back(url); 86 file_urls.push_back(url);
87 } 87 }
88 88
89 return file_manager::file_tasks::ExecuteFileTask( 89 return file_manager::file_tasks::ExecuteFileTask(
90 GetProfile(), 90 GetProfile(),
91 source_url(), 91 source_url(),
92 task, 92 task,
93 file_urls, 93 file_urls,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 SetResult(new base::FundamentalValue(true)); 199 SetResult(new base::FundamentalValue(true));
200 return true; 200 return true;
201 } 201 }
202 202
203 file_manager::file_tasks::UpdateDefaultTask( 203 file_manager::file_tasks::UpdateDefaultTask(
204 GetProfile()->GetPrefs(), params->task_id, suffixes, mime_types); 204 GetProfile()->GetPrefs(), params->task_id, suffixes, mime_types);
205 return true; 205 return true;
206 } 206 }
207 207
208 } // namespace extensions 208 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698