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

Unified Diff: components/sessions/session_command.cc

Issue 1361613002: Move all core files in //components/sessions into core/ subdir (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sessions/session_command.h ('k') | components/sessions/session_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/session_command.cc
diff --git a/components/sessions/session_command.cc b/components/sessions/session_command.cc
deleted file mode 100644
index a7cd59df24fe120d610d30c2f6aef5a7067966ea..0000000000000000000000000000000000000000
--- a/components/sessions/session_command.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2006 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <limits>
-
-#include "base/pickle.h"
-#include "components/sessions/session_command.h"
-
-namespace sessions {
-
-SessionCommand::SessionCommand(id_type id, size_type size)
- : id_(id),
- contents_(size, 0) {
-}
-
-SessionCommand::SessionCommand(id_type id, const base::Pickle& pickle)
- : id_(id),
- contents_(pickle.size(), 0) {
- DCHECK(pickle.size() < std::numeric_limits<size_type>::max());
- memcpy(contents(), pickle.data(), pickle.size());
-}
-
-bool SessionCommand::GetPayload(void* dest, size_t count) const {
- if (size() != count)
- return false;
- memcpy(dest, &(contents_[0]), count);
- return true;
-}
-
-base::Pickle* SessionCommand::PayloadAsPickle() const {
- return new base::Pickle(contents(), static_cast<int>(size()));
-}
-
-} // namespace sessions
« no previous file with comments | « components/sessions/session_command.h ('k') | components/sessions/session_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698