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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/device_event_router.cc

Issue 535673004: Gallery: Fix scrolling by touch in the mosaic view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « apps/launcher.cc ('k') | extensions/browser/api/storage/leveldb_settings_storage_factory.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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/thread_task_runner_handle.h" 6 #include "base/thread_task_runner_handle.h"
7 #include "chrome/browser/chromeos/extensions/file_manager/device_event_router.h" 7 #include "chrome/browser/chromeos/extensions/file_manager/device_event_router.h"
8 #include "chrome/browser/chromeos/file_manager/volume_manager.h" 8 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 DCHECK(thread_checker_.CalledOnValidThread()); 53 DCHECK(thread_checker_.CalledOnValidThread());
54 54
55 if (is_starting_up_ || is_resuming_) { 55 if (is_starting_up_ || is_resuming_) {
56 SetDeviceState(device_path, DEVICE_STATE_USUAL); 56 SetDeviceState(device_path, DEVICE_STATE_USUAL);
57 return; 57 return;
58 } 58 }
59 59
60 if (IsExternalStorageDisabled()) { 60 if (IsExternalStorageDisabled()) {
61 OnDeviceEvent(file_manager_private::DEVICE_EVENT_TYPE_DISABLED, 61 OnDeviceEvent(file_manager_private::DEVICE_EVENT_TYPE_DISABLED,
62 device_path); 62 device_path);
63 SetDeviceState(device_path, DEVICE_STATE_USUAL);
64 return; 63 return;
65 } 64 }
66 65
67 SetDeviceState(device_path, DEVICE_SCANNED); 66 SetDeviceState(device_path, DEVICE_SCANNED);
68 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 67 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
69 FROM_HERE, 68 FROM_HERE,
70 base::Bind(&DeviceEventRouter::OnDeviceAddedDelayed, 69 base::Bind(&DeviceEventRouter::OnDeviceAddedDelayed,
71 weak_factory_.GetWeakPtr(), 70 weak_factory_.GetWeakPtr(),
72 device_path), 71 device_path),
73 scan_time_delta_); 72 scan_time_delta_);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 device_states_[device_path] = state; 188 device_states_[device_path] = state;
190 } else { 189 } else {
191 const std::map<std::string, DeviceState>::iterator it = 190 const std::map<std::string, DeviceState>::iterator it =
192 device_states_.find(device_path); 191 device_states_.find(device_path);
193 if (it != device_states_.end()) 192 if (it != device_states_.end())
194 device_states_.erase(it); 193 device_states_.erase(it);
195 } 194 }
196 } 195 }
197 196
198 } // namespace file_manager 197 } // namespace file_manager
OLDNEW
« no previous file with comments | « apps/launcher.cc ('k') | extensions/browser/api/storage/leveldb_settings_storage_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698