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

Side by Side Diff: components/sessions/core/base_session_service_commands.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/base_session_service_commands.h" 5 #include "components/sessions/core/base_session_service_commands.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "components/sessions/session_backend.h" 8 #include "components/sessions/core/session_backend.h"
9 #include "components/sessions/session_types.h" 9 #include "components/sessions/core/session_types.h"
10 10
11 namespace sessions { 11 namespace sessions {
12 namespace { 12 namespace {
13 13
14 // Helper used by CreateUpdateTabNavigationCommand(). It writes |str| to 14 // Helper used by CreateUpdateTabNavigationCommand(). It writes |str| to
15 // |pickle|, if and only if |str| fits within (|max_bytes| - |*bytes_written|). 15 // |pickle|, if and only if |str| fits within (|max_bytes| - |*bytes_written|).
16 // |bytes_written| is incremented to reflect the data written. 16 // |bytes_written| is incremented to reflect the data written.
17 void WriteStringToPickle(base::Pickle& pickle, 17 void WriteStringToPickle(base::Pickle& pickle,
18 int* bytes_written, 18 int* bytes_written,
19 int max_bytes, 19 int max_bytes,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 std::string* app_name) { 141 std::string* app_name) {
142 scoped_ptr<base::Pickle> pickle(command.PayloadAsPickle()); 142 scoped_ptr<base::Pickle> pickle(command.PayloadAsPickle());
143 if (!pickle.get()) 143 if (!pickle.get())
144 return false; 144 return false;
145 145
146 base::PickleIterator iterator(*pickle); 146 base::PickleIterator iterator(*pickle);
147 return iterator.ReadInt(window_id) && iterator.ReadString(app_name); 147 return iterator.ReadInt(window_id) && iterator.ReadString(app_name);
148 } 148 }
149 149
150 } // namespace sessions 150 } // namespace sessions
OLDNEW
« no previous file with comments | « components/sessions/core/base_session_service_commands.h ('k') | components/sessions/core/base_session_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698