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

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

Issue 93883004: Sync the launch type pref for apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unfix nit because it prevents testing of how invalid values are handled Created 6 years, 11 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
« no previous file with comments | « sync/protocol/proto_enum_conversions.h ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 ENUM_CASE(sync_pb::SyncEnums, ENABLE_SYNC_ON_ACCOUNT); 163 ENUM_CASE(sync_pb::SyncEnums, ENABLE_SYNC_ON_ACCOUNT);
164 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC); 164 ENUM_CASE(sync_pb::SyncEnums, STOP_AND_RESTART_SYNC);
165 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT); 165 ENUM_CASE(sync_pb::SyncEnums, DISABLE_SYNC_ON_CLIENT);
166 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION); 166 ENUM_CASE(sync_pb::SyncEnums, UNKNOWN_ACTION);
167 } 167 }
168 NOTREACHED(); 168 NOTREACHED();
169 return ""; 169 return "";
170 170
171 } 171 }
172 172
173 const char* GetLaunchTypeString(sync_pb::AppSpecifics::LaunchType launch_type) {
174 ASSERT_ENUM_BOUNDS(sync_pb::AppSpecifics, LaunchType, PINNED, WINDOW);
175 switch (launch_type) {
176 ENUM_CASE(sync_pb::AppSpecifics, PINNED);
177 ENUM_CASE(sync_pb::AppSpecifics, REGULAR);
178 ENUM_CASE(sync_pb::AppSpecifics, FULLSCREEN);
179 ENUM_CASE(sync_pb::AppSpecifics, WINDOW);
180 }
181 NOTREACHED();
182 return "";
183 }
184
173 const char* GetDeviceTypeString( 185 const char* GetDeviceTypeString(
174 sync_pb::SyncEnums::DeviceType device_type) { 186 sync_pb::SyncEnums::DeviceType device_type) {
175 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET); 187 ASSERT_ENUM_BOUNDS(sync_pb::SyncEnums, DeviceType, TYPE_WIN, TYPE_TABLET);
176 switch (device_type) { 188 switch (device_type) {
177 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN); 189 ENUM_CASE(sync_pb::SyncEnums, TYPE_WIN);
178 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC); 190 ENUM_CASE(sync_pb::SyncEnums, TYPE_MAC);
179 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX); 191 ENUM_CASE(sync_pb::SyncEnums, TYPE_LINUX);
180 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS); 192 ENUM_CASE(sync_pb::SyncEnums, TYPE_CROS);
181 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER); 193 ENUM_CASE(sync_pb::SyncEnums, TYPE_OTHER);
182 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE); 194 ENUM_CASE(sync_pb::SyncEnums, TYPE_PHONE);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED); 255 ENUM_CASE(sync_pb::TabNavigation, STATE_BLOCKED);
244 } 256 }
245 NOTREACHED(); 257 NOTREACHED();
246 return ""; 258 return "";
247 } 259 }
248 260
249 #undef ASSERT_ENUM_BOUNDS 261 #undef ASSERT_ENUM_BOUNDS
250 #undef ENUM_CASE 262 #undef ENUM_CASE
251 263
252 } // namespace syncer 264 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_enum_conversions.h ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698