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

Side by Side Diff: sync/protocol/proto_enum_conversions.cc

Issue 674633002: sync: add WIFI_CREDENTIALS protobuf, ModelType, and preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: fix error in get commit message Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #include "sync/protocol/proto_enum_conversions.h" 7 #include "sync/protocol/proto_enum_conversions.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, PageTransitionRedirectType, 73 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, PageTransitionRedirectType,
74 CLIENT_REDIRECT, SERVER_REDIRECT); 74 CLIENT_REDIRECT, SERVER_REDIRECT);
75 switch (page_transition_qualifier) { 75 switch (page_transition_qualifier) {
76 ENUM_CASE(sync_pb::SyncEnums, CLIENT_REDIRECT); 76 ENUM_CASE(sync_pb::SyncEnums, CLIENT_REDIRECT);
77 ENUM_CASE(sync_pb::SyncEnums, SERVER_REDIRECT); 77 ENUM_CASE(sync_pb::SyncEnums, SERVER_REDIRECT);
78 } 78 }
79 NOTREACHED(); 79 NOTREACHED();
80 return ""; 80 return "";
81 } 81 }
82 82
83 const char* GetWifiCredentialSecurityClassString(
84 sync_pb::WifiCredentialSpecifics::SecurityClass security_class) {
85 ASSERT_ENUM_BOUNDS(sync_pb::WifiCredentialSpecifics, SecurityClass,
86 SECURITY_CLASS_INVALID, SECURITY_CLASS_PSK);
87 switch (security_class) {
88 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_INVALID);
89 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_NONE);
90 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_WEP);
91 ENUM_CASE(sync_pb::WifiCredentialSpecifics, SECURITY_CLASS_PSK);
92 }
93 NOTREACHED();
94 return "";
95 }
83 const char* GetUpdatesSourceString( 96 const char* GetUpdatesSourceString(
84 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source) { 97 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source) {
85 ASSERT_ENUM_BOUNDS(sync_pb::GetUpdatesCallerInfo, GetUpdatesSource, 98 ASSERT_ENUM_BOUNDS(sync_pb::GetUpdatesCallerInfo, GetUpdatesSource,
86 UNKNOWN, PROGRAMMATIC); 99 UNKNOWN, PROGRAMMATIC);
87 switch (updates_source) { 100 switch (updates_source) {
88 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, UNKNOWN); 101 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, UNKNOWN);
89 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, FIRST_UPDATE); 102 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, FIRST_UPDATE);
90 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, LOCAL); 103 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, LOCAL);
91 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, NOTIFICATION); 104 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, NOTIFICATION);
92 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, PERIODIC); 105 ENUM_CASE(sync_pb::GetUpdatesCallerInfo, PERIODIC);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); 273 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED);
261 } 274 }
262 NOTREACHED(); 275 NOTREACHED();
263 return ""; 276 return "";
264 } 277 }
265 278
266 #undef ASSERT_ENUM_BOUNDS 279 #undef ASSERT_ENUM_BOUNDS
267 #undef ENUM_CASE 280 #undef ENUM_CASE
268 281
269 } // namespace syncer 282 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_enum_conversions.h ('k') | sync/protocol/proto_enum_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698