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

Side by Side Diff: chrome/common/service_process_util_unittest.cc

Issue 105473003: Add explicit base namespace to string16 users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/common/service_process_util_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/service_process_util.h" 5 #include "chrome/common/service_process_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 state.SignalStopped(); 117 state.SignalStopped();
118 LaunchAndWait("ServiceProcessStateTestReadyFalse"); 118 LaunchAndWait("ServiceProcessStateTestReadyFalse");
119 } 119 }
120 120
121 TEST_F(ServiceProcessStateTest, AutoRun) { 121 TEST_F(ServiceProcessStateTest, AutoRun) {
122 ServiceProcessState state; 122 ServiceProcessState state;
123 ASSERT_TRUE(state.AddToAutoRun()); 123 ASSERT_TRUE(state.AddToAutoRun());
124 scoped_ptr<CommandLine> autorun_command_line; 124 scoped_ptr<CommandLine> autorun_command_line;
125 #if defined(OS_WIN) 125 #if defined(OS_WIN)
126 std::string value_name = GetServiceProcessScopedName("_service_run"); 126 std::string value_name = GetServiceProcessScopedName("_service_run");
127 string16 value; 127 base::string16 value;
128 EXPECT_TRUE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER, 128 EXPECT_TRUE(base::win::ReadCommandFromAutoRun(HKEY_CURRENT_USER,
129 UTF8ToWide(value_name), 129 UTF8ToWide(value_name),
130 &value)); 130 &value));
131 autorun_command_line.reset(new CommandLine(CommandLine::FromString(value))); 131 autorun_command_line.reset(new CommandLine(CommandLine::FromString(value)));
132 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 132 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
133 #if defined(GOOGLE_CHROME_BUILD) 133 #if defined(GOOGLE_CHROME_BUILD)
134 std::string base_desktop_name = "google-chrome-service.desktop"; 134 std::string base_desktop_name = "google-chrome-service.desktop";
135 #else // CHROMIUM_BUILD 135 #else // CHROMIUM_BUILD
136 std::string base_desktop_name = "chromium-service.desktop"; 136 std::string base_desktop_name = "chromium-service.desktop";
137 #endif 137 #endif
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 ScopedAttributesRestorer restorer(bundle_path(), 0777); 409 ScopedAttributesRestorer restorer(bundle_path(), 0777);
410 GetIOMessageLoopProxy()->PostTask( 410 GetIOMessageLoopProxy()->PostTask(
411 FROM_HERE, 411 FROM_HERE,
412 base::Bind(&ChangeAttr, bundle_path(), 0222)); 412 base::Bind(&ChangeAttr, bundle_path(), 0222));
413 Run(); 413 Run();
414 ASSERT_TRUE(mock_launchd()->remove_called()); 414 ASSERT_TRUE(mock_launchd()->remove_called());
415 ASSERT_TRUE(mock_launchd()->delete_called()); 415 ASSERT_TRUE(mock_launchd()->delete_called());
416 } 416 }
417 417
418 #endif // !OS_MACOSX 418 #endif // !OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/common/service_process_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698