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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 825353003: Revert of Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (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 #include "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 } 323 }
324 324
325 // Reads file system files from the pickle. 325 // Reads file system files from the pickle.
326 bool ReadFileSystemFilesFromPickle( 326 bool ReadFileSystemFilesFromPickle(
327 const Pickle& pickle, 327 const Pickle& pickle,
328 std::vector<DropData::FileSystemFileInfo>* file_system_files) { 328 std::vector<DropData::FileSystemFileInfo>* file_system_files) {
329 PickleIterator iter(pickle); 329 PickleIterator iter(pickle);
330 330
331 size_t num_files = 0; 331 size_t num_files = 0;
332 if (!iter.ReadSizeT(&num_files)) 332 if (!pickle.ReadSizeT(&iter, &num_files))
333 return false; 333 return false;
334 file_system_files->resize(num_files); 334 file_system_files->resize(num_files);
335 335
336 for (size_t i = 0; i < num_files; ++i) { 336 for (size_t i = 0; i < num_files; ++i) {
337 std::string url_string; 337 std::string url_string;
338 int64 size = 0; 338 int64 size = 0;
339 if (!iter.ReadString(&url_string) || !iter.ReadInt64(&size)) 339 if (!pickle.ReadString(&iter, &url_string) ||
340 !pickle.ReadInt64(&iter, &size))
340 return false; 341 return false;
341 342
342 GURL url(url_string); 343 GURL url(url_string);
343 if (!url.is_valid()) 344 if (!url.is_valid())
344 return false; 345 return false;
345 346
346 (*file_system_files)[i].url = url; 347 (*file_system_files)[i].url = url;
347 (*file_system_files)[i].size = size; 348 (*file_system_files)[i].size = size;
348 } 349 }
349 return true; 350 return true;
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 BrowserAccessibilityManager* manager = 1726 BrowserAccessibilityManager* manager =
1726 web_contents_->GetRootBrowserAccessibilityManager(); 1727 web_contents_->GetRootBrowserAccessibilityManager();
1727 if (!manager) 1728 if (!manager)
1728 return nullptr; 1729 return nullptr;
1729 1730
1730 return manager->GetRoot()->ToBrowserAccessibilityWin(); 1731 return manager->GetRoot()->ToBrowserAccessibilityWin();
1731 } 1732 }
1732 #endif 1733 #endif
1733 1734
1734 } // namespace content 1735 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.cc ('k') | content/browser/zygote_host/zygote_host_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698