OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |