Codebase list mozc / dded40a
Fix namespace comments. These are just mechanical comment fixes that replace "// anonymous namespace" with "// namespace". No behavior change is intended. BUG= TEST=unittest REF_BUG=9010851 REF_CL=85724805,85858513,85861202 Yohei Yukawa 8 years ago
49 changed file(s) with 55 addition(s) and 55 deletion(s). Raw diff Collapse all Expand all
116116
117117 return prelauncher_item;
118118 }
119 } // anonymous namespace
119 } // namespace
120120
121121 string MacUtil::GetLabelForSuffix(const string &suffix) {
122122 return string(kProjectPrefix) + suffix;
12131213 return true;
12141214 }
12151215
1216 } // end of anonymous namespace
1216 } // namespace
12171217
12181218 // Convert Kanji numbers into Arabic numbers:
12191219 // e.g. "百二十万" -> 1200000
325325 PasswordManagerInterface *password_manager_;
326326 Mutex mutex_;
327327 };
328 } // anonymous namespace
328 } // namespace
329329
330330 bool PasswordManager::InitPassword() {
331331 return Singleton<PasswordManagerImpl>::get()->InitPassword();
762762 return trimed_query;
763763 }
764764 }
765 } // anonymous namespace
765 } // namespace
766766
767767 void Composer::GetQueryForPrediction(string *output) const {
768768 string asis_query;
10201020 bool IsAlphabetOrNumber(const Script script) {
10211021 return (script == ALPHABET) || (script == NUMBER);
10221022 }
1023 } // anonymous namespace
1023 } // namespace
10241024
10251025 // static
10261026 bool Composer::TransformCharactersForNumbers(string *query) {
105105 }
106106 return true;
107107 }
108 } // anonymous namespace
108 } // namespace
109109
110110 CharChunk::CharChunk(Transliterators::Transliterator transliterator,
111111 const Table *table)
196196 }
197197 return true;
198198 }
199 } // anonymous namespace
199 } // namespace
200200
201201 TEST_F(CompositionTest, GetChunkAt) {
202202 InitComposition(composition_.get());
468468 table.reset();
469469 return composition;
470470 }
471 } // anonymous namespace
471 } // namespace
472472
473473 TEST_F(CompositionTest, DeleteAt) {
474474 // "あkyきったっty" is the original string
601601
602602 return composition;
603603 }
604 } // anonymous namespace
604 } // namespace
605605
606606 TEST_F(CompositionTest, InsertAt) {
607607 // "あkyきったっty" is the original string
263263 }
264264 };
265265
266 } // anonymous namespace
266 } // namespace
267267
268268
269269 // static
413413 }
414414 return attributes;
415415 }
416 } // anonymous namespace
416 } // namespace
417417
418418 bool Table::LoadFromStream(istream *is) {
419419 DCHECK(is);
548548
549549 return true;
550550 }
551 } // anonymous namespace
551 } // namespace
552552
553553 // static
554554 string Table::ParseSpecialKey(const string &input) {
7979 const int kMinStructureCostOffset = 1151;
8080 const int32 kStopEnmerationCacheSize = 15;
8181
82 } // anonymous namespace
82 } // namespace
8383
8484 CandidateFilter::CandidateFilter(
8585 const SuppressionDictionary *suppression_dictionary,
338338
339339 return segments.segment(segment_num).candidate(0).value;
340340 }
341 } // anonymous namespace
341 } // namespace
342342
343343 TEST_F(ConverterTest, ContextAwareConversionTest) {
344344 // Desirable context aware conversions
522522 config->set_use_keyboard_to_change_preedit_method(false);
523523 }
524524 }
525 } // anonymous namespace
525 } // namespace
526526
527527
528528 // TODO(taku)
9191 // TODO(team): Support other platforms.
9292 return "";
9393 }
94 } // anonymous namespace
94 } // namespace
9595
9696 WordRegisterDialog::WordRegisterDialog()
9797 : is_available_(true),
8888 int commit_counter_;
8989 HandwritingStatus return_status_;
9090 };
91 } // anonymous namespace
91 } // namespace
9292
9393 class HandwritingManagerTest : public testing::Test {
9494 public:
8181 }
8282 }
8383 };
84 } // anonymous namespace
84 } // namespace
8585
8686 class IPCPathManagerTest : public ::testing::Test {
8787 protected:
187187 mach_msg_trailer_t trailer;
188188 };
189189
190 } // anonymous namespace
190 } // namespace
191191
192192 // Client implementation
193193 IPCClient::IPCClient(const string &name)
148148 return bundleIdSet == nullptr || bundleId.empty() ||
149149 bundleIdSet->find(bundleId) != bundleIdSet->end();
150150 }
151 } // anonymous namespace
151 } // namespace
152152
153153
154154 @implementation GoogleJapaneseInputController
209209 NSArray *dummy_screens(id self, SEL selector) {
210210 return [NSArray arrayWithObject:[[[MockScreen alloc] init] autorelease]];
211211 }
212 } // anonymous namespace
212 } // namespace
213213
214214
215215 class MockRenderer : public mozc::renderer::RendererInterface {
141141 auth, rebootPath, kAuthorizationFlagDefaults, args, nullptr);
142142 return status == errAuthorizationSuccess;
143143 }
144 } // anonymous namespace
144 } // namespace
145145
146146 @implementation Uninstaller
147147
9090
9191 def PrintFooter(self):
9292 print """}
93 } // anonymous namespace
93 } // namespace
9494 """ % {'mapname': self._mapname}
9595
9696 def Print(self):
00 MAJOR=2
11 MINOR=17
2 BUILD=2173
2 BUILD=2174
33 REVISION=102
44 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
55 # downloaded by NaCl Mozc.
132132
133133 return final_proxy;
134134 }
135 } // anonymous namespace
135 } // namespace
136136
137137 // MacProxyManager is a proxy manager for Mac OSX. It uses
138138 // CoreService API and SystemConfiguration API to obtain the current
246246 return g_proxy_manager;
247247 }
248248 }
249 } // anonymous namespace
249 } // namespace
250250
251251 void ProxyManager::SetProxyManager(
252252 ProxyManagerInterface *proxy_manager) {
133133 }
134134 return false;
135135 }
136 } // anonymous namespace
136 } // namespace
137137
138138 class UserHistoryPredictorTest : public ::testing::Test {
139139 public:
104104 return baseFrame.size.height;
105105 }
106106
107 } // anonymous namespace
107 } // namespace
108108
109109
110110 CandidateController::CandidateController()
8080 Output dummy_output;
8181 return command_sender->SendCommand(command, &dummy_output);
8282 }
83 } // anonymous namespace
83 } // namespace
8484
8585 InfolistWindow::InfolistWindow()
8686 : lasttimer_(nullptr),
3838 namespace {
3939 // The minimum height of the indicator in the VScrollBar.
4040 const int kMinimumIndicatorHeight = 1;
41 } // anonymous namespace
41 } // namespace
4242
4343 // ------------------------------------------------------------------------
4444 // Initializations
256256 vector<CompositionLineWindow *> line_windows_;
257257 DISALLOW_COPY_AND_ASSIGN(CompositionWindowListImpl);
258258 };
259 } // anonymous namespace
259 } // namespace
260260
261261 CompositionWindowList *CompositionWindowList::CreateInstance() {
262262 return new CompositionWindowListImpl();
115115
116116 return window_rect;
117117 }
118 } // anonymous namespace
118 } // namespace
119119
120120 Rect WindowUtil::GetWindowRectForMainWindowFromPreeditRect(
121121 const Rect &preedit_rect, const Size &window_size,
228228 }
229229
230230 CalculatorInterface *g_calculator = NULL;
231 } // anonymous namespace
231 } // namespace
232232
233233 CalculatorInterface *CalculatorFactory::GetCalculator() {
234234 if (g_calculator == NULL) {
8181 << "expression: " << wrong_key << endl;
8282 }
8383
84 } // anonymous namespace
84 } // namespace
8585
8686 TEST(CalculatorTest, BasicTest) {
8787 CalculatorInterface *calculator = CalculatorFactory::GetCalculator();
1919 return isfinite(x);
2020 #endif
2121 }
22 } // anonymous namespace
22 } // namespace
2323
2424 #include "parser.h"
2525
6767 return isfinite(x);
6868 #endif
6969 }
70 } // anonymous namespace
70 } // namespace
7171
7272 // Contents of parser.h is manually inserted here.
7373 #define PLUS 1
429429 buf.swap(*result);
430430 return true;
431431 }
432 } // anonymous namespace
432 } // namespace
433433
434434 bool CacheServiceManager::IsInstalled() {
435435 ScopedSCHandle service_handle;
123123 };
124124 #endif // OS_ANDROID
125125
126 } // anonymous namespace
126 } // namespace
127127
128128 class SessionRegressionTest : public testing::Test {
129129 protected:
7171 return (((high - 0xD800) & 0x3FF) << 10) +
7272 ((low - 0xDC00) & 0x3FF) + 0x10000;
7373 }
74 } // anonymous namespace
74 } // namespace
7575
7676 bool ReconvertString::Compose(const wstring &preceding_text,
7777 const wstring &preceding_composition,
6464 dwTargetStrOffset = sizeof(wchar_t) * offset_in_chars;
6565 }
6666 };
67 } // anonymous namespace
67 } // namespace
6868
6969 TEST(ReconvertStringTest, BasicTest) {
7070 FixedReconvertString reconvert_string;
238238 }
239239 return succeeded;
240240 }
241 } // anonymous namespace
241 } // namespace
242242
243243 HRESULT ImmRegistrar::Register(const wstring &ime_filename,
244244 const wstring &layout_name,
14321432 kNoCharGenKey,
14331433 kNoCharGenKey,
14341434 };
1435 } // anonymous namespace
1435 } // namespace
14361436
14371437 wchar_t JapaneseKeyboardLayoutEmulator::GetCharacterForKeyDown(
14381438 BYTE virtual_key,
5454 }
5555 return false;
5656 }
57 } // anonymous namespace
57 } // namespace
5858
5959 namespace mozc {
6060 namespace win32 {
3535 namespace {
3636 const BYTE kPressed = 0x80;
3737 const BYTE kToggled = 0x01;
38 } // anonymous namespace
38 } // namespace
3939
4040 class ImeKeyboardTest : public testing::Test {
4141 protected:
6161 REG_NONE, REG_OPTION_NON_VOLATILE,
6262 sam_desired);
6363 }
64 } // anonymous namespace
64 } // namespace
6565
6666 // Writes a REG_SZ channel name into "ap" in Mozc's client state key.
6767 bool OmahaUtil::WriteChannel(const wstring &value) {
146146 ::ImmUnlockIMCC(candidate_info_handle);
147147 return result;
148148 }
149 } // anonymous namespace
149 } // namespace
150150
151151 CandidateInfo::CandidateInfo()
152152 : candidate_info_size(0),
511511 Util::WideToUTF8(wstr, &result);
512512 return result;
513513 }
514 } // anonymous namespace
514 } // namespace
515515
516516 // Some games such as EMIL CHRONICLE ONLINE assumes that
517517 // CANDIDATELIST::dwPageSize never be zero nor grater than 10 despite that
5151 GCS_RESULTCLAUSE);
5252 const DWORD kPreeditAndResultUpdateFlags =
5353 (kPreeditUpdateFlags | kResultUpdateFlags);
54 } // anonymous namespace
54 } // namespace
5555
5656 bool CompositionString::Initialize() {
5757 ::ZeroMemory(this, sizeof(*this));
525525 candidate_list->set_category(commands::CONVERSION);
526526 }
527527 }
528 } // anonymous namespace
528 } // namespace
529529
530530 TEST(ImeCompositionStringTest, StartCompositionTest) {
531531 CompositionString compstr;
162162
163163 DISALLOW_COPY_AND_ASSIGN(MockClient);
164164 };
165 } // anonymous namespace
165 } // namespace
166166
167167 TEST(ImeCoreTest, OpenIME) {
168168 commands::Output mock_output;
372372 #define EXPECT_CLOSECANDIDATE_MSG(actual_msg) \
373373 EXPECT_UI_MSG(WM_IME_NOTIFY, IMN_CLOSECANDIDATE, kCandidateFormIndex, \
374374 (actual_msg))
375 } // anonymous namespace
375 } // namespace
376376
377377
378378 // Check UI message order for
3838 InputContext *AsContext(INPUTCONTEXT *context_pointer) {
3939 return reinterpret_cast<InputContext *>(context_pointer);
4040 }
41 } // anonymous namespace
41 } // namespace
4242
4343 TEST(InputContextTest, InitializeTest) {
4444 // If the conversion mode is not initialized, initialize it with
4343 bool BitwiseTest(LPARAM lParam) {
4444 return (lParam & bit) == bit;
4545 }
46 } // anonymous namespace
46 } // namespace
4747
4848 const LPARAM kNotifyUpdateUI = 0x10000;
4949 const LPARAM kNotifyReconvertFromIME = 0x10001;
117117 rect->set_bottom(position.rcDocument.bottom);
118118 rect->set_right(position.rcDocument.right);
119119 }
120 } // Anonymous namespace
120 } // namespace
121121
122122 UIContext::UIContext(HIMC context_handle)
123123 : context_handle_(context_handle),
4040 // of the suggest window must be true.
4141 bool kDefaultSuggestWindowActivated = true;
4242 bool kDefaultCompositionWindowActivated = false;
43 } // anonymous namespace
43 } // namespace
4444
4545 UIVisibilityTracker::UIVisibilityTracker()
4646 : ui_activated_(kDefaultUIActivated),