| OLD | NEW |
| 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_value_conversions.h" | 7 #include "sync/protocol/proto_value_conversions.h" |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 SET_INT32(window_id); | 150 SET_INT32(window_id); |
| 151 SET_INT32(selected_tab_index); | 151 SET_INT32(selected_tab_index); |
| 152 SET_INT32_REP(tab); | 152 SET_INT32_REP(tab); |
| 153 SET_ENUM(browser_type, GetBrowserTypeString); | 153 SET_ENUM(browser_type, GetBrowserTypeString); |
| 154 return value; | 154 return value; |
| 155 } | 155 } |
| 156 | 156 |
| 157 DictionaryValue* TabNavigationToValue( | 157 DictionaryValue* TabNavigationToValue( |
| 158 const sync_pb::TabNavigation& proto) { | 158 const sync_pb::TabNavigation& proto) { |
| 159 DictionaryValue* value = new DictionaryValue(); | 159 DictionaryValue* value = new DictionaryValue(); |
| 160 SET_INT32(index); | |
| 161 SET_STR(virtual_url); | 160 SET_STR(virtual_url); |
| 162 SET_STR(referrer); | 161 SET_STR(referrer); |
| 163 SET_STR(title); | 162 SET_STR(title); |
| 164 SET_STR(state); | 163 SET_STR(state); |
| 165 SET_ENUM(page_transition, GetPageTransitionString); | 164 SET_ENUM(page_transition, GetPageTransitionString); |
| 166 SET_ENUM(navigation_qualifier, GetPageTransitionQualifierString); | 165 SET_ENUM(navigation_qualifier, GetPageTransitionQualifierString); |
| 166 SET_INT32(unique_id); |
| 167 SET_INT64(timestamp); |
| 167 return value; | 168 return value; |
| 168 } | 169 } |
| 169 | 170 |
| 170 DictionaryValue* PasswordSpecificsDataToValue( | 171 DictionaryValue* PasswordSpecificsDataToValue( |
| 171 const sync_pb::PasswordSpecificsData& proto) { | 172 const sync_pb::PasswordSpecificsData& proto) { |
| 172 DictionaryValue* value = new DictionaryValue(); | 173 DictionaryValue* value = new DictionaryValue(); |
| 173 SET_INT32(scheme); | 174 SET_INT32(scheme); |
| 174 SET_STR(signon_realm); | 175 SET_STR(signon_realm); |
| 175 SET_STR(origin); | 176 SET_STR(origin); |
| 176 SET_STR(action); | 177 SET_STR(action); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 #undef SET_BYTES | 587 #undef SET_BYTES |
| 587 #undef SET_INT32 | 588 #undef SET_INT32 |
| 588 #undef SET_INT64 | 589 #undef SET_INT64 |
| 589 #undef SET_INT64_REP | 590 #undef SET_INT64_REP |
| 590 #undef SET_STR | 591 #undef SET_STR |
| 591 #undef SET_STR_REP | 592 #undef SET_STR_REP |
| 592 | 593 |
| 593 #undef SET_FIELD | 594 #undef SET_FIELD |
| 594 | 595 |
| 595 } // namespace browser_sync | 596 } // namespace browser_sync |
| OLD | NEW |