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

Unified Diff: chrome/app/client_util.h

Issue 1402353011: Expose a function to get the path to a DLL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grt comment #17 (pass StringPiece16 by value) Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chrome_exe_main_win.cc ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/client_util.h
diff --git a/chrome/app/client_util.h b/chrome/app/client_util.h
deleted file mode 100644
index de09a667af9d669ef14096856c4d96b9f2d2d548..0000000000000000000000000000000000000000
--- a/chrome/app/client_util.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file defines utility functions that can report details about the
-// host operating environment.
-
-#ifndef CHROME_APP_CLIENT_UTIL_H_
-#define CHROME_APP_CLIENT_UTIL_H_
-
-#include <windows.h>
-
-#include <string>
-#include "base/strings/string16.h"
-
-namespace sandbox {
- struct SandboxInterfaceInfo;
-}
-
-// Returns the version in the current module's version resource or the empty
-// string if none found.
-base::string16 GetCurrentModuleVersion();
-
-// Implements the common aspects of loading the main dll for both chrome and
-// chromium scenarios, which are in charge of implementing two abstract
-// methods: GetRegistryPath() and OnBeforeLaunch().
-class MainDllLoader {
- public:
- MainDllLoader();
- virtual ~MainDllLoader();
-
- // Loads and calls the entry point of chrome.dll. |instance| is the exe
- // instance retrieved from wWinMain.
- // The return value is what the main entry point of chrome.dll returns
- // upon termination.
- int Launch(HINSTANCE instance);
-
- // Launches a new instance of the browser if the current instance in
- // persistent mode an upgrade is detected.
- void RelaunchChromeBrowserWithNewCommandLineIfNeeded();
-
- protected:
- // Called after chrome.dll has been loaded but before the entry point
- // is invoked. Derived classes can implement custom actions here.
- // |process_type| is the argument to the --type command line argument, e.g.
- // "renderer", "watcher", etc.
- // |dll_path| refers to the path of the Chrome dll being loaded.
- virtual void OnBeforeLaunch(const std::string& process_type,
- const base::FilePath& dll_path) = 0;
-
- // Called after the chrome.dll entry point returns and before terminating
- // this process. The return value will be used as the process return code.
- // |dll_path| refers to the path of the Chrome dll being loaded.
- virtual int OnBeforeExit(int return_code, const base::FilePath& dll_path) = 0;
-
- private:
- // Loads chrome.dll, populating |version| with the version of the DLL loaded
- // and |module| with the path of the loaded DLL. Returns a reference to the
- // module, or null on failure.
- HMODULE Load(base::string16* version, base::FilePath* module);
-
- private:
- HMODULE dll_;
- std::string process_type_;
- const bool metro_mode_;
-};
-
-// Factory for the MainDllLoader. Caller owns the pointer and should call
-// delete to free it.
-MainDllLoader* MakeMainDllLoader();
-
-#endif // CHROME_APP_CLIENT_UTIL_H_
« no previous file with comments | « chrome/app/chrome_exe_main_win.cc ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698