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

Side by Side Diff: apps/app_restore_service_browsertest.cc

Issue 23146016: Add support for directory access to the file system API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@simpler-write-permissions
Patch Set: Created 7 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
« no previous file with comments | « no previous file | apps/launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "apps/app_restore_service.h" 5 #include "apps/app_restore_service.h"
6 #include "apps/app_restore_service_factory.h" 6 #include "apps/app_restore_service_factory.h"
7 #include "apps/saved_files_service.h" 7 #include "apps/saved_files_service.h"
8 #include "chrome/browser/apps/app_browsertest_util.h" 8 #include "chrome/browser/apps/app_browsertest_util.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 SavedFilesService* saved_files_service = SavedFilesService::Get(profile()); 129 SavedFilesService* saved_files_service = SavedFilesService::Get(profile());
130 std::vector<SavedFileEntry> file_entries = 130 std::vector<SavedFileEntry> file_entries =
131 saved_files_service->GetAllFileEntries(extension->id()); 131 saved_files_service->GetAllFileEntries(extension->id());
132 extension_suspended.Wait(); 132 extension_suspended.Wait();
133 133
134 // Simulate a restart by populating the preferences as if the browser didn't 134 // Simulate a restart by populating the preferences as if the browser didn't
135 // get time to clean itself up. 135 // get time to clean itself up.
136 extension_prefs->SetExtensionRunning(extension->id(), true); 136 extension_prefs->SetExtensionRunning(extension->id(), true);
137 for (std::vector<SavedFileEntry>::const_iterator it = file_entries.begin(); 137 for (std::vector<SavedFileEntry>::const_iterator it = file_entries.begin();
138 it != file_entries.end(); ++it) { 138 it != file_entries.end(); ++it) {
139 saved_files_service->RegisterFileEntry(extension->id(), it->id, it->path); 139 saved_files_service->RegisterFileEntry(
140 extension->id(), it->id, it->path, it->is_directory);
140 } 141 }
141 142
142 apps::AppRestoreServiceFactory::GetForProfile(browser()->profile())-> 143 apps::AppRestoreServiceFactory::GetForProfile(browser()->profile())->
143 HandleStartup(true); 144 HandleStartup(true);
144 145
145 access_ok_listener.WaitUntilSatisfied(); 146 access_ok_listener.WaitUntilSatisfied();
146 } 147 }
147 148
148 } // namespace apps 149 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | apps/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698