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

Side by Side Diff: chrome/browser/sessions/base_session_service.cc

Issue 6894009: Change NavigationEntry's title fields to carry the text direction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/sessions/base_session_service.h" 5 #include "chrome/browser/sessions/base_session_service.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Bound the string data (which is variable length) to 151 // Bound the string data (which is variable length) to
152 // |max_state_size bytes| bytes. 152 // |max_state_size bytes| bytes.
153 static const SessionCommand::size_type max_state_size = 153 static const SessionCommand::size_type max_state_size =
154 std::numeric_limits<SessionCommand::size_type>::max() - 1024; 154 std::numeric_limits<SessionCommand::size_type>::max() - 1024;
155 155
156 int bytes_written = 0; 156 int bytes_written = 0;
157 157
158 WriteStringToPickle(pickle, &bytes_written, max_state_size, 158 WriteStringToPickle(pickle, &bytes_written, max_state_size,
159 entry.virtual_url().spec()); 159 entry.virtual_url().spec());
160 160
161 WriteString16ToPickle(pickle, &bytes_written, max_state_size, entry.title()); 161 // TODO(evan): use directionality of title.
162 // http://code.google.com/p/chromium/issues/detail?id=27094
163 WriteString16ToPickle(pickle, &bytes_written, max_state_size,
164 entry.title().string());
162 165
163 if (entry.has_post_data()) { 166 if (entry.has_post_data()) {
164 // Remove the form data, it may contain sensitive information. 167 // Remove the form data, it may contain sensitive information.
165 WriteStringToPickle(pickle, &bytes_written, max_state_size, 168 WriteStringToPickle(pickle, &bytes_written, max_state_size,
166 webkit_glue::RemoveFormDataFromHistoryState(entry.content_state())); 169 webkit_glue::RemoveFormDataFromHistoryState(entry.content_state()));
167 } else { 170 } else {
168 WriteStringToPickle(pickle, &bytes_written, max_state_size, 171 WriteStringToPickle(pickle, &bytes_written, max_state_size,
169 entry.content_state()); 172 entry.content_state());
170 } 173 }
171 174
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (backend_thread()) { 280 if (backend_thread()) {
278 backend_thread()->message_loop()->PostTask(FROM_HERE, 281 backend_thread()->message_loop()->PostTask(FROM_HERE,
279 NewRunnableMethod(backend(), 282 NewRunnableMethod(backend(),
280 &SessionBackend::ReadCurrentSessionCommands, 283 &SessionBackend::ReadCurrentSessionCommands,
281 request_wrapper)); 284 request_wrapper));
282 } else { 285 } else {
283 backend()->ReadCurrentSessionCommands(request); 286 backend()->ReadCurrentSessionCommands(request);
284 } 287 }
285 return request->handle(); 288 return request->handle();
286 } 289 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_http_protocol_handler.cc ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698