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

Side by Side Diff: chrome/browser/chromeos/cros/mount_library.cc

Issue 2496002: Fixing mounting so that it remounts any devices it finds on boot. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/usb_mount_observer.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cros/mount_library.h" 5 #include "chrome/browser/chromeos/cros/mount_library.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/chrome_thread.h" 9 #include "chrome/browser/chrome_thread.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const char* path) { 79 const char* path) {
80 MountLibraryImpl* mount = static_cast<MountLibraryImpl*>(object); 80 MountLibraryImpl* mount = static_cast<MountLibraryImpl*>(object);
81 std::string devicepath = path; 81 std::string devicepath = path;
82 mount->ParseDisks(status); 82 mount->ParseDisks(status);
83 mount->UpdateMountStatus(status, evt, devicepath); 83 mount->UpdateMountStatus(status, evt, devicepath);
84 } 84 }
85 85
86 void MountLibraryImpl::Init() { 86 void MountLibraryImpl::Init() {
87 // Getting the monitor status so that the daemon starts up. 87 // Getting the monitor status so that the daemon starts up.
88 MountStatus* mount = RetrieveMountInformation(); 88 MountStatus* mount = RetrieveMountInformation();
89 ParseDisks(*mount);
89 FreeMountStatus(mount); 90 FreeMountStatus(mount);
90 91
91 mount_status_connection_ = MonitorMountStatus( 92 mount_status_connection_ = MonitorMountStatus(
92 &MountStatusChangedHandler, this); 93 &MountStatusChangedHandler, this);
93 } 94 }
94 95
95 void MountLibraryImpl::UpdateMountStatus(const MountStatus& status, 96 void MountLibraryImpl::UpdateMountStatus(const MountStatus& status,
96 MountEventType evt, 97 MountEventType evt,
97 const std::string& path) { 98 const std::string& path) {
98 // Make sure we run on UI thread. 99 // Make sure we run on UI thread.
99 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); 100 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
100 101
101 FOR_EACH_OBSERVER(Observer, observers_, MountChanged(this, evt, path)); 102 FOR_EACH_OBSERVER(Observer, observers_, MountChanged(this, evt, path));
102 } 103 }
103 104
104 } // namespace chromeos 105 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/usb_mount_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698