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

Side by Side Diff: components/sessions/serialized_navigation_entry.cc

Issue 794683005: replace COMPILE_ASSERT with static_assert in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting fixup Created 5 years, 12 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/sessions/serialized_navigation_entry.h" 5 #include "components/sessions/serialized_navigation_entry.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/sessions/core/serialized_navigation_driver.h" 9 #include "components/sessions/core/serialized_navigation_driver.h"
10 #include "sync/protocol/session_specifics.pb.h" 10 #include "sync/protocol/session_specifics.pb.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // TODO(zea): perhaps sync state (scroll position, form entries, etc.) as well? 297 // TODO(zea): perhaps sync state (scroll position, form entries, etc.) as well?
298 // See http://crbug.com/67068. 298 // See http://crbug.com/67068.
299 sync_pb::TabNavigation SerializedNavigationEntry::ToSyncData() const { 299 sync_pb::TabNavigation SerializedNavigationEntry::ToSyncData() const {
300 sync_pb::TabNavigation sync_data; 300 sync_pb::TabNavigation sync_data;
301 sync_data.set_virtual_url(virtual_url_.spec()); 301 sync_data.set_virtual_url(virtual_url_.spec());
302 sync_data.set_referrer(referrer_url_.spec()); 302 sync_data.set_referrer(referrer_url_.spec());
303 sync_data.set_referrer_policy(referrer_policy_); 303 sync_data.set_referrer_policy(referrer_policy_);
304 sync_data.set_title(base::UTF16ToUTF8(title_)); 304 sync_data.set_title(base::UTF16ToUTF8(title_));
305 305
306 // Page transition core. 306 // Page transition core.
307 COMPILE_ASSERT(ui::PAGE_TRANSITION_LAST_CORE == 307 static_assert(ui::PAGE_TRANSITION_LAST_CORE ==
308 ui::PAGE_TRANSITION_KEYWORD_GENERATED, 308 ui::PAGE_TRANSITION_KEYWORD_GENERATED,
309 PageTransitionCoreBounds); 309 "PAGE_TRANSITION_LAST_CORE must equal "
310 "PAGE_TRANSITION_KEYWORD_GENERATED");
310 switch (ui::PageTransitionStripQualifier(transition_type_)) { 311 switch (ui::PageTransitionStripQualifier(transition_type_)) {
311 case ui::PAGE_TRANSITION_LINK: 312 case ui::PAGE_TRANSITION_LINK:
312 sync_data.set_page_transition( 313 sync_data.set_page_transition(
313 sync_pb::SyncEnums_PageTransition_LINK); 314 sync_pb::SyncEnums_PageTransition_LINK);
314 break; 315 break;
315 case ui::PAGE_TRANSITION_TYPED: 316 case ui::PAGE_TRANSITION_TYPED:
316 sync_data.set_page_transition( 317 sync_data.set_page_transition(
317 sync_pb::SyncEnums_PageTransition_TYPED); 318 sync_pb::SyncEnums_PageTransition_TYPED);
318 break; 319 break;
319 case ui::PAGE_TRANSITION_AUTO_BOOKMARK: 320 case ui::PAGE_TRANSITION_AUTO_BOOKMARK:
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 redirect_chain_[last_entry].spec()); 416 redirect_chain_[last_entry].spec());
416 } 417 }
417 } 418 }
418 419
419 sync_data.set_is_restored(is_restored_); 420 sync_data.set_is_restored(is_restored_);
420 421
421 return sync_data; 422 return sync_data;
422 } 423 }
423 424
424 } // namespace sessions 425 } // namespace sessions
OLDNEW
« no previous file with comments | « components/proximity_auth/wire_message.cc ('k') | components/sessions/session_service_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698