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

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

Issue 280004: Revert wstring patch (r29078 and follow up commits). It is causing failures o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/chrome_plugin_util.h" 5 #include "chrome/common/chrome_plugin_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 CPError CPB_GetCommandLineArgumentsCommon(const char* url, 124 CPError CPB_GetCommandLineArgumentsCommon(const char* url,
125 std::string* arguments) { 125 std::string* arguments) {
126 const CommandLine cmd = *CommandLine::ForCurrentProcess(); 126 const CommandLine cmd = *CommandLine::ForCurrentProcess();
127 std::wstring arguments_w; 127 std::wstring arguments_w;
128 128
129 // Use the same UserDataDir for new launches that we currently have set. 129 // Use the same UserDataDir for new launches that we currently have set.
130 std::wstring user_data_dir = cmd.GetSwitchValue(switches::kUserDataDir); 130 std::wstring user_data_dir = cmd.GetSwitchValue(switches::kUserDataDir);
131 if (!user_data_dir.empty()) { 131 if (!user_data_dir.empty()) {
132 // Make sure user_data_dir is an absolute path. 132 // Make sure user_data_dir is an absolute path.
133 if (file_util::AbsolutePath(&user_data_dir) && 133 if (file_util::AbsolutePath(&user_data_dir) &&
134 file_util::PathExists(FilePath::FromWStringHack(user_data_dir))) { 134 file_util::PathExists(user_data_dir)) {
135 // TODO(evanm): use CommandLine APIs instead of this. 135 // TODO(evanm): use CommandLine APIs instead of this.
136 arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kUserDataDir) + 136 arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kUserDataDir) +
137 L"=\"" + user_data_dir + L"\" "; 137 L"=\"" + user_data_dir + L"\" ";
138 } 138 }
139 } 139 }
140 140
141 // Use '--app=url' instead of just 'url' to launch the browser with minimal 141 // Use '--app=url' instead of just 'url' to launch the browser with minimal
142 // chrome. 142 // chrome.
143 // Note: Do not change this flag! Old Gears shortcuts will break if you do! 143 // Note: Do not change this flag! Old Gears shortcuts will break if you do!
144 std::string url_string(url); 144 std::string url_string(url);
(...skipping 15 matching lines...) Expand all
160 // Host functions shared by browser and plugin processes 160 // Host functions shared by browser and plugin processes
161 // 161 //
162 162
163 void* STDCALL CPB_Alloc(uint32 size) { 163 void* STDCALL CPB_Alloc(uint32 size) {
164 return malloc(size); 164 return malloc(size);
165 } 165 }
166 166
167 void STDCALL CPB_Free(void* memory) { 167 void STDCALL CPB_Free(void* memory) {
168 free(memory); 168 free(memory);
169 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller_unittest.cc ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698