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

Side by Side Diff: chrome/browser/process_singleton_win.cc

Issue 193047: Fix to use FilePath version of PathService::Get.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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
« no previous file with comments | « chrome/browser/importer/safari_importer_unittest.mm ('k') | chrome/browser/rlz/rlz.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 HINSTANCE hinst = GetModuleHandle(NULL); 138 HINSTANCE hinst = GetModuleHandle(NULL);
139 139
140 WNDCLASSEX wc = {0}; 140 WNDCLASSEX wc = {0};
141 wc.cbSize = sizeof(wc); 141 wc.cbSize = sizeof(wc);
142 wc.lpfnWndProc = ProcessSingleton::WndProcStatic; 142 wc.lpfnWndProc = ProcessSingleton::WndProcStatic;
143 wc.hInstance = hinst; 143 wc.hInstance = hinst;
144 wc.lpszClassName = chrome::kMessageWindowClass; 144 wc.lpszClassName = chrome::kMessageWindowClass;
145 ATOM clazz = RegisterClassEx(&wc); 145 ATOM clazz = RegisterClassEx(&wc);
146 DCHECK(clazz); 146 DCHECK(clazz);
147 147
148 std::wstring user_data_dir; 148 FilePath user_data_dir;
149 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 149 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
150 150
151 // Set the window's title to the path of our user data directory so other 151 // Set the window's title to the path of our user data directory so other
152 // Chrome instances can decide if they should forward to us or not. 152 // Chrome instances can decide if they should forward to us or not.
153 window_ = CreateWindow(chrome::kMessageWindowClass, user_data_dir.c_str(), 153 window_ = CreateWindow(chrome::kMessageWindowClass,
154 user_data_dir.value().c_str(),
154 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0); 155 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0);
155 DCHECK(window_); 156 DCHECK(window_);
156 157
157 win_util::SetWindowUserData(window_, this); 158 win_util::SetWindowUserData(window_, this);
158 } 159 }
159 160
160 void ProcessSingleton::Cleanup() { 161 void ProcessSingleton::Cleanup() {
161 } 162 }
162 163
163 LRESULT ProcessSingleton::OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds) { 164 LRESULT ProcessSingleton::OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 switch (message) { 261 switch (message) {
261 case WM_COPYDATA: 262 case WM_COPYDATA:
262 return OnCopyData(reinterpret_cast<HWND>(wparam), 263 return OnCopyData(reinterpret_cast<HWND>(wparam),
263 reinterpret_cast<COPYDATASTRUCT*>(lparam)); 264 reinterpret_cast<COPYDATASTRUCT*>(lparam));
264 default: 265 default:
265 break; 266 break;
266 } 267 }
267 268
268 return ::DefWindowProc(hwnd, message, wparam, lparam); 269 return ::DefWindowProc(hwnd, message, wparam, lparam);
269 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/safari_importer_unittest.mm ('k') | chrome/browser/rlz/rlz.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698