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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10447055: Move fileapi into its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/platform_app_browsertest.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) 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/chromeos/extensions/file_browser_private_api.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "grit/generated_resources.h" 47 #include "grit/generated_resources.h"
48 #include "grit/platform_locale_settings.h" 48 #include "grit/platform_locale_settings.h"
49 #include "net/base/escape.h" 49 #include "net/base/escape.h"
50 #include "ui/base/l10n/l10n_util.h" 50 #include "ui/base/l10n/l10n_util.h"
51 #include "webkit/fileapi/file_system_context.h" 51 #include "webkit/fileapi/file_system_context.h"
52 #include "webkit/fileapi/file_system_file_util.h" 52 #include "webkit/fileapi/file_system_file_util.h"
53 #include "webkit/fileapi/file_system_mount_point_provider.h" 53 #include "webkit/fileapi/file_system_mount_point_provider.h"
54 #include "webkit/fileapi/file_system_operation_context.h" 54 #include "webkit/fileapi/file_system_operation_context.h"
55 #include "webkit/fileapi/file_system_types.h" 55 #include "webkit/fileapi/file_system_types.h"
56 #include "webkit/fileapi/file_system_util.h" 56 #include "webkit/fileapi/file_system_util.h"
57 #include "webkit/glue/webkit_glue.h"
58 57
59 #if defined(OS_CHROMEOS) 58 #if defined(OS_CHROMEOS)
60 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" 59 #include "chrome/browser/chromeos/disks/disk_mount_manager.h"
61 #endif 60 #endif
62 61
63 using chromeos::disks::DiskMountManager; 62 using chromeos::disks::DiskMountManager;
64 using content::BrowserContext; 63 using content::BrowserContext;
65 using content::BrowserThread; 64 using content::BrowserThread;
66 using content::ChildProcessSecurityPolicy; 65 using content::ChildProcessSecurityPolicy;
67 using content::SiteInstance; 66 using content::SiteInstance;
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2043 NOTREACHED(); 2042 NOTREACHED();
2044 SendResponse(false); 2043 SendResponse(false);
2045 } 2044 }
2046 } 2045 }
2047 2046
2048 void TransferFileFunction::OnTransferCompleted(base::PlatformFileError error) { 2047 void TransferFileFunction::OnTransferCompleted(base::PlatformFileError error) {
2049 if (error == base::PLATFORM_FILE_OK) { 2048 if (error == base::PLATFORM_FILE_OK) {
2050 SendResponse(true); 2049 SendResponse(true);
2051 } else { 2050 } else {
2052 error_ = base::StringPrintf("%d", static_cast<int>( 2051 error_ = base::StringPrintf("%d", static_cast<int>(
2053 webkit_glue::PlatformFileErrorToWebFileError(error))); 2052 fileapi::PlatformFileErrorToWebFileError(error)));
2054 SendResponse(false); 2053 SendResponse(false);
2055 } 2054 }
2056 } 2055 }
2057 2056
2058 // Read GData-related preferences. 2057 // Read GData-related preferences.
2059 bool GetGDataPreferencesFunction::RunImpl() { 2058 bool GetGDataPreferencesFunction::RunImpl() {
2060 scoped_ptr<DictionaryValue> value(new DictionaryValue()); 2059 scoped_ptr<DictionaryValue> value(new DictionaryValue());
2061 2060
2062 const PrefService* service = profile_->GetPrefs(); 2061 const PrefService* service = profile_->GetPrefs();
2063 2062
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 gdata::GDataSystemService* system_service = 2162 gdata::GDataSystemService* system_service =
2164 gdata::GDataSystemServiceFactory::GetForProfile(profile_); 2163 gdata::GDataSystemServiceFactory::GetForProfile(profile_);
2165 if (!system_service || !system_service->file_system()) 2164 if (!system_service || !system_service->file_system())
2166 return false; 2165 return false;
2167 2166
2168 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string)); 2167 FilePath directory_path = GetVirtualPathFromURL(GURL(file_url_as_string));
2169 system_service->file_system()->RequestDirectoryRefresh(directory_path); 2168 system_service->file_system()->RequestDirectoryRefresh(directory_path);
2170 2169
2171 return true; 2170 return true;
2172 } 2171 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698