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

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

Issue 3052034: base: Rename EnvVarGetter to Environment. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: review Created 10 years, 4 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
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/browser_init.h" 5 #include "chrome/browser/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "base/env_var.h" 11 #include "base/environment.h"
12 #include "base/event_recorder.h" 12 #include "base/event_recorder.h"
13 #include "base/histogram.h" 13 #include "base/histogram.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "base/scoped_ptr.h" 15 #include "base/scoped_ptr.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "chrome/browser/automation/automation_provider.h" 17 #include "chrome/browser/automation/automation_provider.h"
18 #include "chrome/browser/automation/automation_provider_list.h" 18 #include "chrome/browser/automation/automation_provider_list.h"
19 #include "chrome/browser/automation/chrome_frame_automation_provider.h" 19 #include "chrome/browser/automation/chrome_frame_automation_provider.h"
20 #include "chrome/browser/browser_list.h" 20 #include "chrome/browser/browser_list.h"
21 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 LaunchMode GetLaunchShortcutKind() { 305 LaunchMode GetLaunchShortcutKind() {
306 STARTUPINFOW si = { sizeof(si) }; 306 STARTUPINFOW si = { sizeof(si) };
307 GetStartupInfoW(&si); 307 GetStartupInfoW(&si);
308 if (si.dwFlags & 0x800) { 308 if (si.dwFlags & 0x800) {
309 if (!si.lpTitle) 309 if (!si.lpTitle)
310 return LM_SHORTCUT_NONAME; 310 return LM_SHORTCUT_NONAME;
311 std::wstring shortcut(si.lpTitle); 311 std::wstring shortcut(si.lpTitle);
312 // The windows quick launch path is not localized. 312 // The windows quick launch path is not localized.
313 if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos) 313 if (shortcut.find(L"\\Quick Launch\\") != std::wstring::npos)
314 return LM_SHORTCUT_QUICKLAUNCH; 314 return LM_SHORTCUT_QUICKLAUNCH;
315 scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); 315 scoped_ptr<base::Environment> env(base::Environment::Create());
316 std::string appdata_path; 316 std::string appdata_path;
317 env->GetEnv("USERPROFILE", &appdata_path); 317 env->GetEnv("USERPROFILE", &appdata_path);
318 if (!appdata_path.empty() && 318 if (!appdata_path.empty() &&
319 shortcut.find(ASCIIToWide(appdata_path)) != std::wstring::npos) 319 shortcut.find(ASCIIToWide(appdata_path)) != std::wstring::npos)
320 return LM_SHORTCUT_DESKTOP; 320 return LM_SHORTCUT_DESKTOP;
321 return LM_SHORTCUT_UNKNOWN; 321 return LM_SHORTCUT_UNKNOWN;
322 } 322 }
323 return LM_SHORTCUT_NONE; 323 return LM_SHORTCUT_NONE;
324 } 324 }
325 #else 325 #else
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 scoped_refptr<AutomationProviderClass> automation = 1053 scoped_refptr<AutomationProviderClass> automation =
1054 new AutomationProviderClass(profile); 1054 new AutomationProviderClass(profile);
1055 automation->ConnectToChannel(channel_id); 1055 automation->ConnectToChannel(channel_id);
1056 automation->SetExpectedTabCount(expected_tabs); 1056 automation->SetExpectedTabCount(expected_tabs);
1057 1057
1058 AutomationProviderList* list = 1058 AutomationProviderList* list =
1059 g_browser_process->InitAutomationProviderList(); 1059 g_browser_process->InitAutomationProviderList();
1060 DCHECK(list); 1060 DCHECK(list);
1061 list->AddProvider(automation); 1061 list->AddProvider(automation);
1062 } 1062 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698