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

Side by Side Diff: chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 #include <utility> 6 #include <utility>
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/extensions/activity_log/activity_log.h" 9 #include "chrome/browser/extensions/activity_log/activity_log.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 22 matching lines...) Expand all
33 ExtensionApiTest::SetUpCommandLine(&saved_cmdline_); 33 ExtensionApiTest::SetUpCommandLine(&saved_cmdline_);
34 *base::CommandLine::ForCurrentProcess() = saved_cmdline_; 34 *base::CommandLine::ForCurrentProcess() = saved_cmdline_;
35 } 35 }
36 36
37 void SetUpCommandLine(base::CommandLine* command_line) override { 37 void SetUpCommandLine(base::CommandLine* command_line) override {
38 ExtensionApiTest::SetUpCommandLine(command_line); 38 ExtensionApiTest::SetUpCommandLine(command_line);
39 saved_cmdline_ = *base::CommandLine::ForCurrentProcess(); 39 saved_cmdline_ = *base::CommandLine::ForCurrentProcess();
40 command_line->AppendSwitch(switches::kEnableExtensionActivityLogging); 40 command_line->AppendSwitch(switches::kEnableExtensionActivityLogging);
41 } 41 }
42 42
43 scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) { 43 std::unique_ptr<HttpResponse> HandleRequest(const HttpRequest& request) {
44 scoped_ptr<BasicHttpResponse> response(new BasicHttpResponse); 44 std::unique_ptr<BasicHttpResponse> response(new BasicHttpResponse);
45 response->set_code(net::HTTP_OK); 45 response->set_code(net::HTTP_OK);
46 response->set_content("<html><head><title>ActivityLogTest</title>" 46 response->set_content("<html><head><title>ActivityLogTest</title>"
47 "</head><body>Hello World</body></html>"); 47 "</head><body>Hello World</body></html>");
48 return std::move(response); 48 return std::move(response);
49 } 49 }
50 50
51 private: 51 private:
52 base::CommandLine saved_cmdline_; 52 base::CommandLine saved_cmdline_;
53 }; 53 };
54 54
(...skipping 16 matching lines...) Expand all
71 71
72 const Extension* friend_extension = LoadExtensionIncognito( 72 const Extension* friend_extension = LoadExtensionIncognito(
73 test_data_dir_.AppendASCII("activity_log_private/friend")); 73 test_data_dir_.AppendASCII("activity_log_private/friend"));
74 ASSERT_TRUE(friend_extension); 74 ASSERT_TRUE(friend_extension);
75 ASSERT_TRUE(RunExtensionTest("activity_log_private/test")); 75 ASSERT_TRUE(RunExtensionTest("activity_log_private/test"));
76 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(false); 76 ActivityLog::GetInstance(profile())->SetWatchdogAppActiveForTesting(false);
77 } 77 }
78 78
79 } // namespace extensions 79 } // namespace extensions
80 80
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698