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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_host.cc

Issue 10573017: Rename SpellCheckCommon namespace to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/spellchecker/spellcheck_host.h" 5 #include "chrome/browser/spellchecker/spellcheck_host.h"
6 6
7 #include "base/string_split.h" 7 #include "base/string_split.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "chrome/browser/prefs/pref_member.h" 9 #include "chrome/browser/prefs/pref_member.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (spellcheck_mac::SpellCheckerAvailable()) 63 if (spellcheck_mac::SpellCheckerAvailable())
64 spellcheck_mac::GetAvailableLanguages(&accept_languages); 64 spellcheck_mac::GetAvailableLanguages(&accept_languages);
65 else 65 else
66 base::SplitString(accept_languages_pref.GetValue(), ',', &accept_languages); 66 base::SplitString(accept_languages_pref.GetValue(), ',', &accept_languages);
67 #else 67 #else
68 base::SplitString(accept_languages_pref.GetValue(), ',', &accept_languages); 68 base::SplitString(accept_languages_pref.GetValue(), ',', &accept_languages);
69 #endif // !OS_MACOSX 69 #endif // !OS_MACOSX
70 70
71 for (std::vector<std::string>::const_iterator i = accept_languages.begin(); 71 for (std::vector<std::string>::const_iterator i = accept_languages.begin();
72 i != accept_languages.end(); ++i) { 72 i != accept_languages.end(); ++i) {
73 std::string language = 73 std::string language = chrome::GetCorrespondingSpellCheckLanguage(*i);
74 SpellCheckCommon::GetCorrespondingSpellCheckLanguage(*i);
75 if (!language.empty() && 74 if (!language.empty() &&
76 std::find(languages->begin(), languages->end(), language) == 75 std::find(languages->begin(), languages->end(), language) ==
77 languages->end()) { 76 languages->end()) {
78 languages->push_back(language); 77 languages->push_back(language);
79 } 78 }
80 } 79 }
81 80
82 for (size_t i = 0; i < languages->size(); ++i) { 81 for (size_t i = 0; i < languages->size(); ++i) {
83 if ((*languages)[i] == dictionary_language) 82 if ((*languages)[i] == dictionary_language)
84 return i; 83 return i;
(...skipping 20 matching lines...) Expand all
105 } 104 }
106 105
107 // static 106 // static
108 SpellCheckHost::EventType SpellCheckHost::WaitStatusEvent() { 107 SpellCheckHost::EventType SpellCheckHost::WaitStatusEvent() {
109 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
110 109
111 if (g_status_event) 110 if (g_status_event)
112 g_status_event->Wait(); 111 g_status_event->Wait();
113 return g_status_type; 112 return g_status_type;
114 } 113 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/spellchecker/spellcheck_host_browsertest.cc » ('j') | chrome/common/spellcheck_common.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698