Cleanup part 6.

Lots of small things (mostly in spellcheck code), e.g.:
* L"" -> std::wstring()
* type *var; -> type* var;
* Fix parameter line-wrapping to comply with style guide
* Remove unnecessary classname scoping inside class delcaration
* Remove empty declaration
* Add/remove blank lines in hopes of increasing readability
* Add block ("{", "}") around local use of a temporary that is later redefined
* Fold temps into other statements where obvious
* Use std::find() instead of hand-rolling the same functionality
* Combine distinct cases in switch statements when they all do the same thing
* Range-check to avoid some algorithmic work when it's not needed
* at() -> []

...and various others.  Pretty much every change stands on its own.  Do not hesitate to complain about changes you think are unhelpful to the code, this change is something of a dumping ground.  (I did try to avoid the sort of gratuitous "const"-adding that has gotten me in trouble before :). )
Review URL: http://codereview.chromium.org/13688

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6745 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 60f2022b..d8f2f64 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -938,13 +938,12 @@
   if (enable_spellcheck) {
     std::wstring dict_dir;
     PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir);
-    std::wstring language = prefs->GetString(prefs::kSpellCheckDictionary);
-
     // Note that, as the object pointed to by previously by spellchecker_ 
     // is being deleted in the io thread, the spellchecker_ can be made to point
     // to a new object (RE-initialized) in parallel in this UI thread.
-    spellchecker_ = new SpellChecker(dict_dir, language, GetRequestContext(), 
-                                     L"");
+    spellchecker_ = new SpellChecker(dict_dir,
+        prefs->GetString(prefs::kSpellCheckDictionary), GetRequestContext(),
+        std::wstring());
     spellchecker_->AddRef();  // Manual refcounting.
   } else {
     spellchecker_ = NULL;