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

Side by Side Diff: chrome/installer/util/firewall_manager_win.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 "chrome/installer/util/firewall_manager_win.h" 5 #include "chrome/installer/util/firewall_manager_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility>
10
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
12 #include "chrome/installer/util/advanced_firewall_manager_win.h" 14 #include "chrome/installer/util/advanced_firewall_manager_win.h"
13 #include "chrome/installer/util/browser_distribution.h" 15 #include "chrome/installer/util/browser_distribution.h"
14 #include "chrome/installer/util/install_util.h" 16 #include "chrome/installer/util/install_util.h"
15 #include "chrome/installer/util/installer_util_strings.h" 17 #include "chrome/installer/util/installer_util_strings.h"
16 #include "chrome/installer/util/l10n_string_util.h" 18 #include "chrome/installer/util/l10n_string_util.h"
17 #include "chrome/installer/util/legacy_firewall_manager_win.h" 19 #include "chrome/installer/util/legacy_firewall_manager_win.h"
18 20
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 FirewallManager::~FirewallManager() {} 103 FirewallManager::~FirewallManager() {}
102 104
103 // static 105 // static
104 scoped_ptr<FirewallManager> FirewallManager::Create( 106 scoped_ptr<FirewallManager> FirewallManager::Create(
105 BrowserDistribution* dist, 107 BrowserDistribution* dist,
106 const base::FilePath& chrome_path) { 108 const base::FilePath& chrome_path) {
107 // First try to connect to "Windows Firewall with Advanced Security" (Vista+). 109 // First try to connect to "Windows Firewall with Advanced Security" (Vista+).
108 scoped_ptr<FirewallManagerAdvancedImpl> manager( 110 scoped_ptr<FirewallManagerAdvancedImpl> manager(
109 new FirewallManagerAdvancedImpl()); 111 new FirewallManagerAdvancedImpl());
110 if (manager->Init(dist->GetDisplayName(), chrome_path)) 112 if (manager->Init(dist->GetDisplayName(), chrome_path))
111 return manager.Pass(); 113 return std::move(manager);
112 114
113 // Next try to connect to "Windows Firewall for Windows XP with SP2". 115 // Next try to connect to "Windows Firewall for Windows XP with SP2".
114 scoped_ptr<FirewallManagerLegacyImpl> legacy_manager( 116 scoped_ptr<FirewallManagerLegacyImpl> legacy_manager(
115 new FirewallManagerLegacyImpl()); 117 new FirewallManagerLegacyImpl());
116 if (legacy_manager->Init(dist->GetDisplayName(), chrome_path)) 118 if (legacy_manager->Init(dist->GetDisplayName(), chrome_path))
117 return legacy_manager.Pass(); 119 return std::move(legacy_manager);
118 120
119 return scoped_ptr<FirewallManager>(); 121 return nullptr;
120 } 122 }
121 123
122 FirewallManager::FirewallManager() { 124 FirewallManager::FirewallManager() {
123 } 125 }
124 126
125 } // namespace installer 127 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/chromium_binaries_distribution.cc ('k') | chrome/installer/util/google_chrome_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698