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

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

Issue 6019007: Remove win_util::FormatMessage and FormatLastWin32Error. These were only used... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/hwnd_util.h"
8 #include "app/win_util.h" 9 #include "app/win_util.h"
9 #include "base/base_paths.h" 10 #include "base/base_paths.h"
10 #include "base/command_line.h" 11 #include "base/command_line.h"
11 #include "base/file_path.h" 12 #include "base/file_path.h"
12 #include "base/path_service.h" 13 #include "base/path_service.h"
13 #include "base/process_util.h" 14 #include "base/process_util.h"
14 #include "base/scoped_handle.h" 15 #include "base/scoped_handle.h"
15 #include "base/win_util.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/extensions/extensions_startup.h" 17 #include "chrome/browser/extensions/extensions_startup.h"
18 #include "chrome/browser/platform_util.h" 18 #include "chrome/browser/platform_util.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/profiles/profile_manager.h" 20 #include "chrome/browser/profiles/profile_manager.h"
21 #include "chrome/browser/ui/browser_init.h" 21 #include "chrome/browser/ui/browser_init.h"
22 #include "chrome/common/chrome_constants.h" 22 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_paths.h" 23 #include "chrome/common/chrome_paths.h"
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/result_codes.h" 25 #include "chrome/common/result_codes.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 FilePath user_data_dir; 185 FilePath user_data_dir;
186 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 186 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
187 187
188 // Set the window's title to the path of our user data directory so other 188 // Set the window's title to the path of our user data directory so other
189 // Chrome instances can decide if they should forward to us or not. 189 // Chrome instances can decide if they should forward to us or not.
190 window_ = CreateWindow(chrome::kMessageWindowClass, 190 window_ = CreateWindow(chrome::kMessageWindowClass,
191 user_data_dir.value().c_str(), 191 user_data_dir.value().c_str(),
192 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0); 192 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0);
193 DCHECK(window_); 193 DCHECK(window_);
194 194
195 win_util::SetWindowUserData(window_, this); 195 app::win::SetWindowUserData(window_, this);
196 return true; 196 return true;
197 } 197 }
198 198
199 void ProcessSingleton::Cleanup() { 199 void ProcessSingleton::Cleanup() {
200 } 200 }
201 201
202 LRESULT ProcessSingleton::OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds) { 202 LRESULT ProcessSingleton::OnCopyData(HWND hwnd, const COPYDATASTRUCT* cds) {
203 // If locked, it means we are not ready to process this message because 203 // If locked, it means we are not ready to process this message because
204 // we are probably in a first run critical phase. 204 // we are probably in a first run critical phase.
205 if (locked_) { 205 if (locked_) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 switch (message) { 302 switch (message) {
303 case WM_COPYDATA: 303 case WM_COPYDATA:
304 return OnCopyData(reinterpret_cast<HWND>(wparam), 304 return OnCopyData(reinterpret_cast<HWND>(wparam),
305 reinterpret_cast<COPYDATASTRUCT*>(lparam)); 305 reinterpret_cast<COPYDATASTRUCT*>(lparam));
306 default: 306 default:
307 break; 307 break;
308 } 308 }
309 309
310 return ::DefWindowProc(hwnd, message, wparam, lparam); 310 return ::DefWindowProc(hwnd, message, wparam, lparam);
311 } 311 }
OLDNEW
« no previous file with comments | « chrome/browser/hang_monitor/hung_plugin_action.cc ('k') | chrome/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698