summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 01:10:45 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 01:10:45 +0000
commitb4037d13ad107e6fc72e1149ed4f760e08aedd9a (patch)
tree370e5a60e694bab5d7e6dc04010c5c2a966fd6d0 /chrome/browser/browser_init.cc
parente896a4d2af4d4c15aeeeb66fb2b18950f777f103 (diff)
downloadchromium_src-b4037d13ad107e6fc72e1149ed4f760e08aedd9a.zip
chromium_src-b4037d13ad107e6fc72e1149ed4f760e08aedd9a.tar.gz
chromium_src-b4037d13ad107e6fc72e1149ed4f760e08aedd9a.tar.bz2
Lands http://codereview.chromium.org/379007 for Dave:
Fixes leak in BackingStore as shown by valgrind. XFree doesn't free the data of the image, where as XDestroyImage does. BUG=none TEST=none Review URL: http://codereview.chromium.org/391008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 5a08089..bfc3f5e 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -49,6 +49,8 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/gview_request_interceptor.h"
+#include "chrome/browser/chromeos/mount_library.h"
+#include "chrome/browser/chromeos/usb_mount_observer.h"
#include "chrome/browser/views/tabs/tab_overview_message_listener.h"
#endif
@@ -341,6 +343,14 @@ bool LaunchBrowser(const CommandLine& command_line, Profile* profile,
if (parsed_command_line.HasSwitch(switches::kEnableGView)) {
chromeos::GViewRequestInterceptor::GetGViewRequestInterceptor();
}
+ if (process_startup) {
+ // TODO(dhg): Try to make this just USBMountObserver::Get()->set_profile
+ // and have the constructor take care of everything else.
+ chromeos::MountLibrary* lib = chromeos::MountLibrary::Get();
+ chromeos::USBMountObserver* observe = chromeos::USBMountObserver::Get();
+ observe->set_profile(profile);
+ lib->AddObserver(observe);
+ }
#endif
return true;
}