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

Side by Side Diff: net/base/net_errors.cc

Issue 10920087: Update callers of CreateFileSystemOperation so more detailed error codes can be returned. Where app… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error 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
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/fileapi/file_system_context.h » ('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 "net/base/net_errors.h" 5 #include "net/base/net_errors.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/stringize_macros.h" 9 #include "base/stringize_macros.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 std::vector<int> GetAllErrorCodesForUma() { 42 std::vector<int> GetAllErrorCodesForUma() {
43 return base::CustomHistogram::ArrayToCustomRanges( 43 return base::CustomHistogram::ArrayToCustomRanges(
44 kAllErrorCodes, arraysize(kAllErrorCodes)); 44 kAllErrorCodes, arraysize(kAllErrorCodes));
45 } 45 }
46 46
47 Error PlatformFileErrorToNetError( 47 Error PlatformFileErrorToNetError(
48 base::PlatformFileError file_error) { 48 base::PlatformFileError file_error) {
49 switch (file_error) { 49 switch (file_error) {
50 case base::PLATFORM_FILE_OK: 50 case base::PLATFORM_FILE_OK:
51 return net::OK; 51 return net::OK;
52 case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
53 return net::ERR_ACCESS_DENIED;
54 case base::PLATFORM_FILE_ERROR_INVALID_URL:
55 return net::ERR_INVALID_URL;
52 case base::PLATFORM_FILE_ERROR_NOT_FOUND: 56 case base::PLATFORM_FILE_ERROR_NOT_FOUND:
53 return net::ERR_FILE_NOT_FOUND; 57 return net::ERR_FILE_NOT_FOUND;
54 case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
55 return net::ERR_ACCESS_DENIED;
56 default: 58 default:
57 return net::ERR_FAILED; 59 return net::ERR_FAILED;
58 } 60 }
59 } 61 }
60 62
61 } // namespace net 63 } // namespace net
OLDNEW
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/fileapi/file_system_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698