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

Side by Side Diff: chrome/browser/automation/automation_provider.cc

Issue 2800029: PyAuto: Collect branding info as a part of GetBrowserInfo() (Closed)
Patch Set: . Created 10 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
« no previous file with comments | « no previous file | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/automation/automation_provider.h" 5 #include "chrome/browser/automation/automation_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/message_box_flags.h" 10 #include "app/message_box_flags.h"
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 DictionaryValue* properties = new DictionaryValue; 1634 DictionaryValue* properties = new DictionaryValue;
1635 properties->SetString(L"ChromeVersion", chrome::kChromeVersion); 1635 properties->SetString(L"ChromeVersion", chrome::kChromeVersion);
1636 properties->SetString(L"BrowserProcessExecutableName", 1636 properties->SetString(L"BrowserProcessExecutableName",
1637 chrome::kBrowserProcessExecutableName); 1637 chrome::kBrowserProcessExecutableName);
1638 properties->SetString(L"HelperProcessExecutableName", 1638 properties->SetString(L"HelperProcessExecutableName",
1639 chrome::kHelperProcessExecutableName); 1639 chrome::kHelperProcessExecutableName);
1640 properties->SetString(L"BrowserProcessExecutablePath", 1640 properties->SetString(L"BrowserProcessExecutablePath",
1641 chrome::kBrowserProcessExecutablePath); 1641 chrome::kBrowserProcessExecutablePath);
1642 properties->SetString(L"HelperProcessExecutablePath", 1642 properties->SetString(L"HelperProcessExecutablePath",
1643 chrome::kHelperProcessExecutablePath); 1643 chrome::kHelperProcessExecutablePath);
1644 #if defined(OS_WIN)
1645 properties->SetString(L"command_line_string", 1644 properties->SetString(L"command_line_string",
1646 CommandLine::ForCurrentProcess()->command_line_string()); 1645 CommandLine::ForCurrentProcess()->command_line_string());
1647 #elif defined(OS_POSIX) 1646
1648 properties->SetString(L"command_line_string", 1647 std::string branding;
1649 JoinString(CommandLine::ForCurrentProcess()->argv(), ' ')); 1648 #if defined(GOOGLE_CHROME_BUILD)
1649 branding = "Google Chrome";
1650 #elif defined(CHROMIUM_BUILD)
1651 branding = "Chromium";
1652 #else
1653 branding = "Unknown Branding";
1650 #endif 1654 #endif
1655 properties->SetString(L"branding", branding);
1651 1656
1652 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 1657 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
1653 return_value->Set(L"properties", properties); 1658 return_value->Set(L"properties", properties);
1654 1659
1655 return_value->SetInteger(L"browser_pid", base::GetCurrentProcId()); 1660 return_value->SetInteger(L"browser_pid", base::GetCurrentProcId());
1656 // Add info about all windows in a list of dictionaries, one dictionary 1661 // Add info about all windows in a list of dictionaries, one dictionary
1657 // item per window. 1662 // item per window.
1658 ListValue* windows = new ListValue; 1663 ListValue* windows = new ListValue;
1659 int windex = 0; 1664 int windex = 0;
1660 for (BrowserList::const_iterator it = BrowserList::begin(); 1665 for (BrowserList::const_iterator it = BrowserList::begin();
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 } 3509 }
3505 3510
3506 void AutomationProvider::WaitForPopupMenuToOpen(IPC::Message* reply_message) { 3511 void AutomationProvider::WaitForPopupMenuToOpen(IPC::Message* reply_message) {
3507 NOTIMPLEMENTED(); 3512 NOTIMPLEMENTED();
3508 } 3513 }
3509 #endif // !defined(TOOLKIT_VIEWS) 3514 #endif // !defined(TOOLKIT_VIEWS)
3510 3515
3511 void AutomationProvider::ResetToDefaultTheme() { 3516 void AutomationProvider::ResetToDefaultTheme() {
3512 profile_->ClearTheme(); 3517 profile_->ClearTheme();
3513 } 3518 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698