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

Unified Diff: sandbox/linux/services/broker_process_utils.h

Issue 18337010: Avoid std::string copying in GetFileNameInWhitelist. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 5 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
Index: sandbox/linux/services/broker_process_utils.h
diff --git a/sandbox/linux/services/broker_process_utils.h b/sandbox/linux/services/broker_process_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a522f063ad18fe7c0a64005f86c94bb835bb045
--- /dev/null
+++ b/sandbox/linux/services/broker_process_utils.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2013 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 SANDBOX_LINUX_SERVICES_BROKER_PROCESS_UTILS_H_
+#define SANDBOX_LINUX_SERVICES_BROKER_PROCESS_UTILS_H_
+
+#include <string>
+#include <vector>
+
+namespace sandbox {
+
jln (very slow on Chromium) 2013/07/08 22:36:51 Add some documentation about the class and about t
+class BrokerProcessUtils {
jln (very slow on Chromium) 2013/07/08 22:36:51 You absolutely need unit tests as well!
jln (very slow on Chromium) 2013/07/08 22:36:51 Let's name it something less specific, like Sandbo
Jorge Lucangeli Obes 2013/07/09 03:52:12 Done.
+ public:
+ static const char* Find(const char* needle,
+ const std::vector<std::string>& haystack);
jln (very slow on Chromium) 2013/07/08 22:36:51 Don't forget to document these functions, even if
Jorge Lucangeli Obes 2013/07/09 03:52:12 Done.
+ static int StrCmp(const char* s1, const char* s2);
+};
jln (very slow on Chromium) 2013/07/08 22:36:51 Don't forget DISALLOW_IMPLICIT_CONSTRUCTORS
Jorge Lucangeli Obes 2013/07/09 03:52:12 Done.
+
+} // namespace sandbox
+
+#endif // SANDBOX_LINUX_SERVICES_BROKER_PROCESS_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698