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

Side by Side Diff: chrome_frame/delete_chrome_history.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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) 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 // Implementation of DeleteChromeHistory 5 // Implementation of DeleteChromeHistory
6 #include "chrome_frame/delete_chrome_history.h" 6 #include "chrome_frame/delete_chrome_history.h"
7 7
8 #include "chrome/browser/browsing_data_remover.h" 8 #include "chrome/browser/browsing_data_remover.h"
9 9
10 #include "base/win/windows_version.h"
10 #include "chrome_frame/chrome_frame_activex.h" 11 #include "chrome_frame/chrome_frame_activex.h"
11 #include "chrome_frame/utils.h" 12 #include "chrome_frame/utils.h"
12 13
13 // Below other header to avoid symbol pollution. 14 // Below other header to avoid symbol pollution.
14 #define INITGUID 15 #define INITGUID
15 #include <deletebrowsinghistory.h> 16 #include <deletebrowsinghistory.h>
16 17
17 DeleteChromeHistory::DeleteChromeHistory() 18 DeleteChromeHistory::DeleteChromeHistory()
18 : remove_mask_(0) { 19 : remove_mask_(0) {
19 DLOG(INFO) << __FUNCTION__; 20 DLOG(INFO) << __FUNCTION__;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // in lieu of sending an IPC when it seems appropriate. Since we assume this 59 // in lieu of sending an IPC when it seems appropriate. Since we assume this
59 // happens in one-off fashion, don't attempt to pack REMOVE_* arguments. 60 // happens in one-off fashion, don't attempt to pack REMOVE_* arguments.
60 // Instead, have the browser process clobber all history. 61 // Instead, have the browser process clobber all history.
61 // 62 //
62 // IE8 on Vista launches us twice when the user asks to delete browsing data - 63 // IE8 on Vista launches us twice when the user asks to delete browsing data -
63 // once in low integrity and once in medium integrity. The low integrity 64 // once in low integrity and once in medium integrity. The low integrity
64 // instance will fail to connect to the automation server and restart it in an 65 // instance will fail to connect to the automation server and restart it in an
65 // effort to connect. Thus, we detect if we are in that circumstance and exit 66 // effort to connect. Thus, we detect if we are in that circumstance and exit
66 // silently. 67 // silently.
67 base::IntegrityLevel integrity_level; 68 base::IntegrityLevel integrity_level;
68 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA && 69 if (base::win::GetVersion() >= base::win::VERSION_VISTA &&
69 !base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), 70 !base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(),
70 &integrity_level)) { 71 &integrity_level)) {
71 return E_UNEXPECTED; 72 return E_UNEXPECTED;
72 } 73 }
73 if (integrity_level == base::LOW_INTEGRITY) { 74 if (integrity_level == base::LOW_INTEGRITY) {
74 return S_OK; 75 return S_OK;
75 } 76 }
76 if (!InitializeAutomation(GetHostProcessName(false), L"", false, false, 77 if (!InitializeAutomation(GetHostProcessName(false), L"", false, false,
77 GURL(), GURL(), true)) { 78 GURL(), GURL(), true)) {
78 return E_UNEXPECTED; 79 return E_UNEXPECTED;
(...skipping 11 matching lines...) Expand all
90 remove_mask_ |= BrowsingDataRemover::REMOVE_HISTORY; 91 remove_mask_ |= BrowsingDataRemover::REMOVE_HISTORY;
91 92
92 loop_.PostDelayedTask(FROM_HERE, 93 loop_.PostDelayedTask(FROM_HERE,
93 new MessageLoop::QuitTask, 1000 * 600); 94 new MessageLoop::QuitTask, 1000 * 600);
94 loop_.MessageLoop::Run(); 95 loop_.MessageLoop::Run();
95 96
96 return S_OK; 97 return S_OK;
97 } 98 }
98 99
99 100
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698