Package list mozc / 6300449
Imported Upstream version 0.12.434.102 Nobuhiro Iwamatsu 11 years ago
27 changed file(s) with 52 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
350350 LinuxStatsConfigUtilImpl::~LinuxStatsConfigUtilImpl() {}
351351
352352 bool LinuxStatsConfigUtilImpl::IsEnabled() {
353 return true;
353 return false;
354354 }
355355
356356 bool LinuxStatsConfigUtilImpl::SetEnabled(bool val) {
839839 } // namespace mozc
840840 #endif // OS_WINDOWS
841841
842 #ifdef OS_LINUX
843 TEST(StatsConfigUtilTestLinux, DefaultValueTest) {
844 EXPECT_FALSE(mozc::StatsConfigUtil::IsEnabled());
845 }
846 #endif
99 (like 社員証, 再起動) are added. We basically collected these compounds
1010 with a set of POS rules.
1111 - Open source version doesn't include Katakana transliterations.
12 (あんどろいど->Android)
12 (いんたーねっと->Internet)
1313 - Open source version doesn't include Japanese postal code dictionary .
1414
1515 You can add zip code dictionary by follows:
339339 }
340340
341341 void ConfigDialog::SetSendStatsCheckBox() {
342 // On windows, usage_stats flag is managed by
343 // administration_dialog. http://b/issue?id=2889759
344 #ifndef OS_WINDOWS
342345 const bool val = StatsConfigUtil::IsEnabled();
343346 usageStatsCheckBox->setChecked(val);
347 #endif // OS_WINDOWS
344348 }
345349
346350 void ConfigDialog::GetSendStatsCheckBox() const {
351 // On windows, usage_stats flag is managed by
352 // administration_dialog. http://b/issue?id=2889759
353 #ifndef OS_WINDOWS
347354 const bool val = usageStatsCheckBox->isChecked();
348355 StatsConfigUtil::SetEnabled(val);
356 #endif // OS_WINDOWS
349357 }
350358
351359 #define SET_COMBOBOX(combobox, enumname, field) \
264264 *ipc_name = kIPCPrefix;
265265 #endif // OS_WINDOWS
266266
267 #ifdef OS_LINUX
268 // On Linux, use abstract namespace which is independent of the file system.
269 (*ipc_name)[0] = '\0';
270 #endif
271
267272 ipc_name->append(ipc_path_info_->key());
268273 ipc_name->append(".");
269274 ipc_name->append(name_);
358363 char filename[512];
359364 snprintf(proc, sizeof(proc) - 1, "/proc/%u/exe", server_pid_);
360365 const ssize_t size = readlink(proc, filename, sizeof(filename) - 1);
361 if (size == static_cast<size_t>(-1)) {
366 if (size == -1) {
362367 LOG(ERROR) << "readlink failed: " << strerror(errno);
363368 return false;
364369 }
9191 EXPECT_FALSE(manager->GetServerProductVersion().empty());
9292 EXPECT_GT(manager->GetServerProcessId(), 0);
9393 EXPECT_EQ(t.path(), path);
94 #ifdef OS_LINUX
95 // On Linux, |path| should be abstract (see man unix(7) for details.)
96 ASSERT_FALSE(path.empty());
97 EXPECT_EQ('\0', path[0]);
98 #endif
9499 }
95100
96101 // Test the thread-safeness of GetPathName() and
248248 << strerror(errno);
249249 }
250250 }
251
252 // Returns true if address is in abstract namespace. See unix(7) on Linux for
253 // details.
254 bool IsAbstractSocket(const string& address) {
255 return (!address.empty()) && (address[0] == '\0');
256 }
251257 } // namespace
252258
253259 // Client
408414 #ifdef OS_MACOSX
409415 addr.sun_len = SUN_LEN(&addr);
410416 const size_t sun_len = sizeof(addr);
411 ::chmod(server_address_.c_str(), 0600); // Linux does not use files for IPC.
412417 #else
413418 const size_t sun_len = sizeof(addr.sun_family) + server_address_.size();
414419 #endif
420 if (!IsAbstractSocket(server_address_)) {
421 // Linux does not use files for IPC.
422 ::chmod(server_address_.c_str(), 0600);
423 }
415424 if (::bind(socket_, reinterpret_cast<sockaddr *>(&addr), sun_len) != 0) {
425 // The UNIX domain socket file (server_address_) already exists?
416426 LOG(FATAL) << "bind() failed: " << strerror(errno);
417427 return;
418428 }
437447 }
438448 ::shutdown(socket_, SHUT_RDWR);
439449 ::close(socket_);
440 #ifdef OS_MACOSX
441 // Since Linux uses abstract namespace, unlink() is not necessary.
442 ::unlink(server_address_.c_str());
443 #endif
450 if (!IsAbstractSocket(server_address_)) {
451 // When abstract namespace is used, unlink() is not necessary.
452 ::unlink(server_address_.c_str());
453 }
444454 connected_ = false;
445455 socket_ = kInvalidSocket;
446456 VLOG(1) << "IPCServer destructed";
486496
487497 ::shutdown(socket_, SHUT_RDWR);
488498 ::close(socket_);
489 #ifdef OS_MACOSX
490 // Since Linux uses abstract namespace, unlink() is not necessary.
491 ::unlink(server_address_.c_str());
492 #endif
499 if (!IsAbstractSocket(server_address_)) {
500 // When abstract namespace is used, unlink() is not necessary.
501 ::unlink(server_address_.c_str());
502 }
493503 connected_ = false;
494504 socket_ = kInvalidSocket;
495505 }
00 MAJOR=0
11 MINOR=12
2 BUILD=422
2 BUILD=434
33 REVISION=102
0 mozc (0.12.434.102) lucid; urgency=low
1
2 * Ver. 0.12.434.102 on 2010-08-11
3
4 -- Yasuhiro Matsuda <mazda> Wed, 11 Aug 2010 19:59:17 +0900
5
06 mozc (0.12.422.102) lucid; urgency=low
17
28 * Ver. 0.12.422.102 on 2010-07-23