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

Side by Side Diff: cloud_print/virtual_driver/win/install/setup.cc

Issue 10687007: Added Chrome profile option in registry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 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 <windows.h> 5 #include <windows.h>
6 #include <setupapi.h> // Must be included after windows.h 6 #include <setupapi.h> // Must be included after windows.h
7 #include <winspool.h> 7 #include <winspool.h>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 30 matching lines...) Expand all
41 const wchar_t kGcpUrl[] = L"http://www.google.com/cloudprint"; 41 const wchar_t kGcpUrl[] = L"http://www.google.com/cloudprint";
42 42
43 void SetOmahaKeys() { 43 void SetOmahaKeys() {
44 base::win::RegKey key; 44 base::win::RegKey key;
45 if (key.Create(HKEY_LOCAL_MACHINE, cloud_print::kKeyLocation, 45 if (key.Create(HKEY_LOCAL_MACHINE, cloud_print::kKeyLocation,
46 KEY_SET_VALUE) != ERROR_SUCCESS) { 46 KEY_SET_VALUE) != ERROR_SUCCESS) {
47 LOG(ERROR) << "Unable to open key"; 47 LOG(ERROR) << "Unable to open key";
48 } 48 }
49 49
50 // Get the version from the resource file. 50 // Get the version from the resource file.
51 std::wstring version_string; 51 string16 version_string;
52 scoped_ptr<FileVersionInfo> version_info( 52 scoped_ptr<FileVersionInfo> version_info(
53 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); 53 FileVersionInfo::CreateFileVersionInfoForCurrentModule());
54 54
55 if (version_info.get()) { 55 if (version_info.get()) {
56 FileVersionInfoWin* version_info_win = 56 FileVersionInfoWin* version_info_win =
57 static_cast<FileVersionInfoWin*>(version_info.get()); 57 static_cast<FileVersionInfoWin*>(version_info.get());
58 version_string = version_info_win->product_version(); 58 version_string = version_info_win->product_version();
59 } else { 59 } else {
60 LOG(ERROR) << "Unable to get version string"; 60 LOG(ERROR) << "Unable to get version string";
61 // Use a random version string so that Omaha has something to go by. 61 // Use a random version string so that Omaha has something to go by.
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 580 }
581 } 581 }
582 } 582 }
583 // Installer is silent by default as required by Omaha. 583 // Installer is silent by default as required by Omaha.
584 if (CommandLine::ForCurrentProcess()->HasSwitch("verbose")) { 584 if (CommandLine::ForCurrentProcess()->HasSwitch("verbose")) {
585 cloud_print::DisplayWindowsMessage(NULL, retval, 585 cloud_print::DisplayWindowsMessage(NULL, retval,
586 cloud_print::LoadLocalString(IDS_DRIVER_NAME)); 586 cloud_print::LoadLocalString(IDS_DRIVER_NAME));
587 } 587 }
588 return retval; 588 return retval;
589 } 589 }
OLDNEW
« no previous file with comments | « cloud_print/virtual_driver/virtual_driver_switches.cc ('k') | cloud_print/virtual_driver/win/port_monitor/port_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698