Remove dead code
BUG=
TEST=
REF_BUG=
REF_CL=127794971
REF_TIME=2016-07-19T14:02:40+09:00
REF_TIME_RAW=1468904560 +0900
Hiroshi Sumita
7 years ago
32 | 32 |
namespace mozc {
|
33 | 33 |
#ifdef GOOGLE_JAPANESE_INPUT_BUILD
|
34 | 34 |
const char kProductNameInEnglish[] = "Google Japanese Input";
|
35 | |
// "Google 日本語入力"
|
36 | |
const char kProductNameLocalized[]
|
37 | |
= "Google \xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E\xE5\x85\xA5\xE5\x8A\x9B";
|
38 | 35 |
#define kProductPrefix "GoogleJapaneseInput"
|
39 | 36 |
#else // GOOGLE_JAPANESE_INPUT_BUILD
|
40 | 37 |
const char kProductNameInEnglish[] = "Mozc";
|
41 | |
const char kProductNameLocalized[] = "Mozc";
|
42 | 38 |
#define kProductPrefix "Mozc"
|
43 | 39 |
#endif // GOOGLE_JAPANESE_INPUT_BUILD
|
44 | 40 |
|
793 | 793 |
return true;
|
794 | 794 |
}
|
795 | 795 |
|
796 | |
template <typename T>
|
797 | |
T StrToRealNumber(const char *ptr, char **end_ptr) {
|
798 | |
static_assert(GenericFalseTypeArity2<T, T>::value,
|
799 | |
"Shouldn't be used with implicit type conversion.");
|
800 | |
return false;
|
801 | |
}
|
802 | |
|
803 | 796 |
} // namespace
|
804 | 797 |
|
805 | 798 |
bool NumberUtil::SafeStrToInt16(StringPiece str, int16 *value) {
|
35 | 35 |
|
36 | 36 |
namespace mozc {
|
37 | 37 |
|
38 | |
extern bool kUseMockPasswordManager;
|
39 | 38 |
class PasswordManagerInterface;
|
40 | 39 |
|
41 | 40 |
// PasswordManager is a class for managing
|
170 | 170 |
NodeType node_type;
|
171 | 171 |
uint32 attributes;
|
172 | 172 |
|
173 | |
// Equal to that of Candidate.
|
174 | |
size_t consumed_key_size;
|
175 | |
|
176 | 173 |
// key: The user input.
|
177 | 174 |
// actual_key: The actual search key that corresponds to the value.
|
178 | 175 |
// Can differ from key when no modifier conversion is enabled.
|
0 | 0 |
MAJOR=2
|
1 | 1 |
MINOR=18
|
2 | |
BUILD=2578
|
|
2 |
BUILD=2579
|
3 | 3 |
REVISION=102
|
4 | 4 |
# CAUTION: NACL_DICTIONARY_VERSION is going to be migrated to ENGINE_VERSION.
|
5 | 5 |
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
|
276 | 276 |
status == UserDictionaryCommandStatus::USER_DICTIONARY_COMMAND_SUCCESS;
|
277 | 277 |
}
|
278 | 278 |
|
279 | |
bool UserDictionaryStorage::CopyDictionary(uint64 dic_id,
|
280 | |
const string &dic_name,
|
281 | |
uint64 *new_dic_id) {
|
282 | |
last_error_type_ = USER_DICTIONARY_STORAGE_NO_ERROR;
|
283 | |
|
284 | |
if (!UserDictionaryStorage::IsValidDictionaryName(dic_name)) {
|
285 | |
LOG(ERROR) << "Invalid dictionary name is passed";
|
286 | |
return false;
|
287 | |
}
|
288 | |
|
289 | |
if (UserDictionaryUtil::IsStorageFull(*this)) {
|
290 | |
last_error_type_ = TOO_MANY_DICTIONARIES;
|
291 | |
LOG(ERROR) << "too many dictionaries";
|
292 | |
return false;
|
293 | |
}
|
294 | |
|
295 | |
if (new_dic_id == NULL) {
|
296 | |
last_error_type_ = UNKNOWN_ERROR;
|
297 | |
LOG(ERROR) << "new_dic_id is NULL";
|
298 | |
return false;
|
299 | |
}
|
300 | |
|
301 | |
UserDictionary *dic = GetUserDictionary(dic_id);
|
302 | |
if (dic == NULL) {
|
303 | |
last_error_type_ = INVALID_DICTIONARY_ID;
|
304 | |
LOG(ERROR) << "Invalid dictionary id: " << dic_id;
|
305 | |
return false;
|
306 | |
}
|
307 | |
|
308 | |
UserDictionary *new_dic = add_dictionaries();
|
309 | |
new_dic->CopyFrom(*dic);
|
310 | |
|
311 | |
*new_dic_id = UserDictionaryUtil::CreateNewDictionaryId(*this);
|
312 | |
dic->set_id(*new_dic_id);
|
313 | |
dic->set_name(dic_name);
|
314 | |
|
315 | |
return true;
|
316 | |
}
|
317 | |
|
318 | 279 |
bool UserDictionaryStorage::DeleteDictionary(uint64 dic_id) {
|
319 | 280 |
if (!UserDictionaryUtil::DeleteDictionary(this, dic_id, NULL, NULL)) {
|
320 | 281 |
// Failed to delete dictionary.
|
133 | 133 |
|
134 | 134 |
bool CreateDictionary(const string &dic_name, uint64 *new_dic_id);
|
135 | 135 |
|
136 | |
// Create a copy of an existing dictionary giving it a specified
|
137 | |
// name. Returns the id of the new dictionary via new_dic_id.
|
138 | |
bool CopyDictionary(uint64 dic_id, const string &dic_name,
|
139 | |
uint64 *new_dic_id);
|
140 | |
|
141 | 136 |
// Delete a dictionary.
|
142 | 137 |
bool DeleteDictionary(uint64 dic_id);
|
143 | 138 |
|
90 | 90 |
#define EXPECT_PROTO_EQ(expect, actual) \
|
91 | 91 |
EXPECT_PRED_FORMAT2(::mozc::testing::EqualsProto, expect, actual)
|
92 | 92 |
|
93 | |
// Thin wrapper of PartiallyEqualsProto to if check expect and actual has same
|
94 | |
// type on compile time.
|
95 | |
template<typename T>
|
96 | |
::testing::AssertionResult PartiallyEqualsProtoInternal(
|
97 | |
const char *expect_string, const char *actual_string,
|
98 | |
const T &expect, const T &actual) {
|
99 | |
return ::mozc::testing::internal::EqualsProtoFormat(
|
100 | |
expect_string, actual_string, expect, actual, true);
|
101 | |
}
|
102 | |
|
103 | 93 |
// To accept string constant, we also define a function takeing const char *.
|
104 | 94 |
::testing::AssertionResult PartiallyEqualsProto(
|
105 | 95 |
const char *expect_string, const char *actual_string,
|