InitBrowserMenu(); InitMaileditMenu(); InitMailviewMenu(); InitComposerMenu();
mRDFService = do_GetService(kRDFServiceCID, &res);  if (NS_SUCCEEDED(res))  { res = mRDFService->RegisterDataSource(this, PR_FALSE);  res = nsComponentManager::CreateInstance(kRDFInMemoryDataSourceCID, nsnull, NS_GET_IID(nsIRDFDataSource), (void**) &mInner);  mRDFService->GetResource(NS_LITERAL_CSTRING(kURINC_BrowserCharsetMenuRoot), &kNC_BrowserCharsetMenuRoot); }   nsCOMPtr<nsIPrefService> PrefService = do_GetService(NS_PREFSERVICE_CONTRACTID, &res); if (NS_SUCCEEDED(res)) res = PrefService->GetBranch(nsnull, getter_AddRefs(mPrefs));   mCharsetMenuObserver = new nsCharsetMenuObserver(this);  if (mCharsetMenuObserver)  { nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &res);  if (NS_SUCCEEDED(res)) res = observerService->AddObserver(mCharsetMenuObserver, "charsetmenu-selected", PR_FALSE); }  NS_ASSERTION(NS_SUCCEEDED(res), "Failed to initialize nsCharsetMenu"); NS_TIMELINE_STOP_TIMER("nsCharsetMenu::nsCharsetMenu"); NS_TIMELINE_MARK_TIMER("nsCharsetMenu::nsCharsetMenu");
nsCharsetMenu::nsCharsetMenu() {  NS_INIT_REFCNT();  PR_AtomicIncrement(&g_InstanceCount);  Init();  // XXX create the services here and send them as params to init methods  InitBrowserMenu();  InitMaileditMenu();  InitMailviewMenu();  InitComposerMenu();}