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

Unified Diff: headless/public/headless_browser.cc

Issue 2013483002: headless: Make HeadlessBrowser::Options move-only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/public/headless_browser.h ('k') | headless/test/headless_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.cc
diff --git a/headless/public/headless_browser.cc b/headless/public/headless_browser.cc
index 6ff0a0c35ff00fa081f6429764dea3e1b469d2f0..07d263641ac90fdd82feffc9131a158c89593088 100644
--- a/headless/public/headless_browser.cc
+++ b/headless/public/headless_browser.cc
@@ -23,10 +23,12 @@ Options::Options(int argc, const char** argv)
message_pump(nullptr),
single_process_mode(false) {}
-Options::Options(const Options& other) = default;
+Options::Options(Options&& options) = default;
Options::~Options() {}
+Options& Options::operator=(Options&& options) = default;
+
Builder::Builder(int argc, const char** argv) : options_(argc, argv) {}
Builder::Builder() : options_(0, nullptr) {}
@@ -64,7 +66,7 @@ Builder& Builder::SetSingleProcessMode(bool single_process_mode) {
}
Options Builder::Build() {
- return options_;
+ return std::move(options_);
}
} // namespace headless
« no previous file with comments | « headless/public/headless_browser.h ('k') | headless/test/headless_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698