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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/request_manager.cc

Issue 1151763007: Add the boilerplate for actions to File System Provider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + fixed a comment. Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/file_system_provider/request_manager.h" 5 #include "chrome/browser/chromeos/file_system_provider/request_manager.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 10
11 namespace chromeos { 11 namespace chromeos {
12 namespace file_system_provider { 12 namespace file_system_provider {
13 namespace { 13 namespace {
14 14
15 // Timeout in seconds, before a request is considered as stale and hence 15 // Timeout in seconds, before a request is considered as stale and hence
16 // aborted. 16 // aborted.
17 const int kDefaultTimeout = 10; 17 const int kDefaultTimeout = 10;
18 18
19 } // namespace 19 } // namespace
20 20
21 std::string RequestTypeToString(RequestType type) { 21 std::string RequestTypeToString(RequestType type) {
22 switch (type) { 22 switch (type) {
23 case REQUEST_UNMOUNT: 23 case REQUEST_UNMOUNT:
24 return "REQUEST_UNMOUNT"; 24 return "REQUEST_UNMOUNT";
25 case GET_METADATA: 25 case GET_METADATA:
26 return "GET_METADATA"; 26 return "GET_METADATA";
27 case GET_ACTIONS:
28 return "GET_ACTIONS";
27 case READ_DIRECTORY: 29 case READ_DIRECTORY:
28 return "READ_DIRECTORY"; 30 return "READ_DIRECTORY";
29 case OPEN_FILE: 31 case OPEN_FILE:
30 return "OPEN_FILE"; 32 return "OPEN_FILE";
31 case CLOSE_FILE: 33 case CLOSE_FILE:
32 return "CLOSE_FILE"; 34 return "CLOSE_FILE";
33 case READ_FILE: 35 case READ_FILE:
34 return "READ_FILE"; 36 return "READ_FILE";
35 case CREATE_DIRECTORY: 37 case CREATE_DIRECTORY:
36 return "CREATE_DIRECTORY"; 38 return "CREATE_DIRECTORY";
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 notification_manager_->HideUnresponsiveNotification(request_id); 256 notification_manager_->HideUnresponsiveNotification(request_id);
255 257
256 FOR_EACH_OBSERVER(Observer, observers_, OnRequestDestroyed(request_id)); 258 FOR_EACH_OBSERVER(Observer, observers_, OnRequestDestroyed(request_id));
257 259
258 TRACE_EVENT_ASYNC_END0( 260 TRACE_EVENT_ASYNC_END0(
259 "file_system_provider", "RequestManager::Request", request_id); 261 "file_system_provider", "RequestManager::Request", request_id);
260 } 262 }
261 263
262 } // namespace file_system_provider 264 } // namespace file_system_provider
263 } // namespace chromeos 265 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698