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

Unified Diff: chrome/test/base/scoped_command_line_override.h

Issue 8561031: Replace ScopedCommandLineOverride with TestSuite listener. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Last nit from Pawel. Created 9 years, 1 month 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
Index: chrome/test/base/scoped_command_line_override.h
diff --git a/chrome/test/base/scoped_command_line_override.h b/chrome/test/base/scoped_command_line_override.h
deleted file mode 100644
index 33ebd8a1ff356616230089938aa20a4fbc252d3c..0000000000000000000000000000000000000000
--- a/chrome/test/base/scoped_command_line_override.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_TEST_BASE_SCOPED_COMMAND_LINE_OVERRIDE_H_
-#define CHROME_TEST_BASE_SCOPED_COMMAND_LINE_OVERRIDE_H_
-#pragma once
-
-#include <string>
-
-#include "base/command_line.h"
-
-// ScopedCommandLineOverride takes the CommandLine for the current
-// process, saves it, then alters it. When the instance of this class
-// goes out of scope, it restores CommandLine to its prior state. The
-// intended usage is to test something that requires a flag that's off
-// by default:
-//
-// ASSERT_TRUE(!Something::NotFullyBaked());
-// {
-// ScopedCommandLineOverride override(switches:kEnableSomethingHalfBaked);
-// ASSERT_TRUE(Something::NotFullyBaked());
-// }
-class ScopedCommandLineOverride {
- public:
- explicit ScopedCommandLineOverride(const std::string& new_switch);
- virtual ~ScopedCommandLineOverride();
- private:
- CommandLine old_command_line_;
-};
-
-#endif // CHROME_TEST_BASE_SCOPED_COMMAND_LINE_OVERRIDE_H_

Powered by Google App Engine
This is Rietveld 408576698