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

Side by Side Diff: chrome/browser/extensions/api/downloads_internal/downloads_internal_api.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 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
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 "chrome/browser/extensions/api/downloads_internal/downloads_internal_ap i.h" 5 #include "chrome/browser/extensions/api/downloads_internal/downloads_internal_ap i.h"
6 6
7 #include "chrome/browser/extensions/api/downloads/downloads_api.h" 7 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
8 #include "chrome/common/extensions/api/downloads.h" 8 #include "chrome/common/extensions/api/downloads.h"
9 #include "chrome/common/extensions/api/downloads_internal.h" 9 #include "chrome/common/extensions/api/downloads_internal.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 DownloadsInternalDetermineFilenameFunction:: 13 DownloadsInternalDetermineFilenameFunction::
14 DownloadsInternalDetermineFilenameFunction() {} 14 DownloadsInternalDetermineFilenameFunction() {}
15 15
16 DownloadsInternalDetermineFilenameFunction:: 16 DownloadsInternalDetermineFilenameFunction::
17 ~DownloadsInternalDetermineFilenameFunction() {} 17 ~DownloadsInternalDetermineFilenameFunction() {}
18 18
19 typedef extensions::api::downloads_internal::DetermineFilename::Params 19 typedef extensions::api::downloads_internal::DetermineFilename::Params
20 DetermineFilenameParams; 20 DetermineFilenameParams;
21 21
22 bool DownloadsInternalDetermineFilenameFunction::RunAsync() { 22 bool DownloadsInternalDetermineFilenameFunction::RunAsync() {
23 scoped_ptr<DetermineFilenameParams> params( 23 std::unique_ptr<DetermineFilenameParams> params(
24 DetermineFilenameParams::Create(*args_)); 24 DetermineFilenameParams::Create(*args_));
25 EXTENSION_FUNCTION_VALIDATE(params.get()); 25 EXTENSION_FUNCTION_VALIDATE(params.get());
26 base::FilePath::StringType filename; 26 base::FilePath::StringType filename;
27 EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &filename)); 27 EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &filename));
28 return ExtensionDownloadsEventRouter::DetermineFilename( 28 return ExtensionDownloadsEventRouter::DetermineFilename(
29 GetProfile(), 29 GetProfile(),
30 include_incognito(), 30 include_incognito(),
31 extension()->id(), 31 extension()->id(),
32 params->download_id, 32 params->download_id,
33 base::FilePath(filename), 33 base::FilePath(filename),
34 extensions::api::downloads::ParseFilenameConflictAction( 34 extensions::api::downloads::ParseFilenameConflictAction(
35 params->conflict_action), 35 params->conflict_action),
36 &error_); 36 &error_);
37 } 37 }
38 38
39 } // namespace extensions 39 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698