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

Side by Side Diff: chrome/browser/extensions/platform_app_launcher.cc

Issue 10879002: kFileSystemTypeIsolated should be only used in the URL exposed to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 3 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/platform_app_launcher.h" 5 #include "chrome/browser/extensions/platform_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // regranted, as this would overwrite any other permissions which the 196 // regranted, as this would overwrite any other permissions which the
197 // renderer may already have. 197 // renderer may already have.
198 if (!policy->CanReadFile(renderer_id, file_path)) 198 if (!policy->CanReadFile(renderer_id, file_path))
199 policy->GrantReadFile(renderer_id, file_path); 199 policy->GrantReadFile(renderer_id, file_path);
200 200
201 std::string registered_name; 201 std::string registered_name;
202 fileapi::IsolatedContext* isolated_context = 202 fileapi::IsolatedContext* isolated_context =
203 fileapi::IsolatedContext::GetInstance(); 203 fileapi::IsolatedContext::GetInstance();
204 DCHECK(isolated_context); 204 DCHECK(isolated_context);
205 std::string filesystem_id = isolated_context->RegisterFileSystemForPath( 205 std::string filesystem_id = isolated_context->RegisterFileSystemForPath(
206 fileapi::kFileSystemTypeIsolated, file_path, &registered_name); 206 fileapi::kFileSystemTypeNativeLocal, file_path, &registered_name);
207 // Granting read file system permission as well to allow file-system 207 // Granting read file system permission as well to allow file-system
208 // read operations. 208 // read operations.
209 policy->GrantReadFileSystem(renderer_id, filesystem_id); 209 policy->GrantReadFileSystem(renderer_id, filesystem_id);
210 210
211 extensions::AppEventRouter::DispatchOnLaunchedEventWithFileEntry( 211 extensions::AppEventRouter::DispatchOnLaunchedEventWithFileEntry(
212 profile_, extension_, ASCIIToUTF16(kViewIntent), filesystem_id, 212 profile_, extension_, ASCIIToUTF16(kViewIntent), filesystem_id,
213 registered_name); 213 registered_name);
214 } 214 }
215 215
216 // The profile the app should be run in. 216 // The profile the app should be run in.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 new PlatformAppBlobIntentLauncher(profile, extension, web_intent_data); 327 new PlatformAppBlobIntentLauncher(profile, extension, web_intent_data);
328 launcher->Launch(); 328 launcher->Launch();
329 return; 329 return;
330 } 330 }
331 331
332 extensions::AppEventRouter::DispatchOnLaunchedEventWithWebIntent( 332 extensions::AppEventRouter::DispatchOnLaunchedEventWithWebIntent(
333 profile, extension, web_intent_data); 333 profile, extension, web_intent_data);
334 } 334 }
335 335
336 } // namespace extensions 336 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | chrome/renderer/extensions/file_system_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698