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

Side by Side Diff: content/browser/indexed_db/indexed_db_internals_ui.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/indexed_db/indexed_db_internals_ui.h" 5 #include "content/browser/indexed_db/indexed_db_internals_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/files/scoped_temp_dir.h" 11 #include "base/files/scoped_temp_dir.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "content/browser/indexed_db/indexed_db_context_impl.h" 15 #include "content/browser/indexed_db/indexed_db_context_impl.h"
15 #include "content/grit/content_resources.h" 16 #include "content/grit/content_resources.h"
16 #include "content/public/browser/browser_context.h" 17 #include "content/public/browser/browser_context.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 306
306 // This is how to watch for the download to finish: first wait for it 307 // This is how to watch for the download to finish: first wait for it
307 // to start, then attach a DownloadItem::Observer to observe the 308 // to start, then attach a DownloadItem::Observer to observe the
308 // state change to the finished state. 309 // state change to the finished state.
309 dl_params->set_callback(base::Bind(&IndexedDBInternalsUI::OnDownloadStarted, 310 dl_params->set_callback(base::Bind(&IndexedDBInternalsUI::OnDownloadStarted,
310 base::Unretained(this), 311 base::Unretained(this),
311 partition_path, 312 partition_path,
312 origin_url, 313 origin_url,
313 temp_path, 314 temp_path,
314 connection_count)); 315 connection_count));
315 dlm->DownloadUrl(dl_params.Pass()); 316 dlm->DownloadUrl(std::move(dl_params));
316 } 317 }
317 318
318 // The entire purpose of this class is to delete the temp file after 319 // The entire purpose of this class is to delete the temp file after
319 // the download is complete. 320 // the download is complete.
320 class FileDeleter : public DownloadItem::Observer { 321 class FileDeleter : public DownloadItem::Observer {
321 public: 322 public:
322 explicit FileDeleter(const base::FilePath& temp_dir) : temp_dir_(temp_dir) {} 323 explicit FileDeleter(const base::FilePath& temp_dir) : temp_dir_(temp_dir) {}
323 ~FileDeleter() override; 324 ~FileDeleter() override;
324 325
325 void OnDownloadUpdated(DownloadItem* download) override; 326 void OnDownloadUpdated(DownloadItem* download) override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 372
372 item->AddObserver(new FileDeleter(temp_path)); 373 item->AddObserver(new FileDeleter(temp_path));
373 web_ui()->CallJavascriptFunction( 374 web_ui()->CallJavascriptFunction(
374 "indexeddb.onOriginDownloadReady", 375 "indexeddb.onOriginDownloadReady",
375 base::StringValue(partition_path.value()), 376 base::StringValue(partition_path.value()),
376 base::StringValue(origin_url.spec()), 377 base::StringValue(origin_url.spec()),
377 base::FundamentalValue(static_cast<double>(connection_count))); 378 base::FundamentalValue(static_cast<double>(connection_count)));
378 } 379 }
379 380
380 } // namespace content 381 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_index_writer.cc ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698