Skip to content

Commit

Permalink
Fixes CRLF and trailing white spaces.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
[email protected] committed Mar 5, 2009
1 parent 6390be3 commit f0a51fb
Show file tree
Hide file tree
Showing 566 changed files with 4,084 additions and 4,084 deletions.
4 changes: 2 additions & 2 deletions base/object_watcher_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ void RunTest_CancelAfterSet(MessageLoop::Type message_loop_type) {
Sleep(30);

watcher.StopWatching();

MessageLoop::current()->RunAllPending();

// Our delegate should not have fired.
EXPECT_EQ(1, counter);

CloseHandle(event);
}

Expand Down
2 changes: 1 addition & 1 deletion base/observer_list_threadsafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class ObserverListThreadSafe
// ObserverList. This function MUST be called on the thread which owns
// the unsafe ObserverList.
template <class Method, class Params>
void NotifyWrapper(ObserverList<ObserverType>* list,
void NotifyWrapper(ObserverList<ObserverType>* list,
const UnboundMethod<ObserverType, Method, Params>& method) {

// Check that this list still needs notifications.
Expand Down
12 changes: 6 additions & 6 deletions base/process_util_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ bool LaunchApp(const CommandLine& cl,
if (result) {
return &entry_;
}

return NULL;
}

Expand All @@ -167,14 +167,14 @@ bool LaunchApp(const CommandLine& cl,

std::string data;
std::string exec_name;

for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
kinfo_proc* kinfo = &kinfo_procs_[index_of_kinfo_proc_];

// Skip processes just awaiting collection
if ((kinfo->kp_proc.p_pid > 0) && (kinfo->kp_proc.p_stat == SZOMB))
continue;

int mib[] = { CTL_KERN, KERN_PROCARGS, kinfo->kp_proc.p_pid };

// Found out what size buffer we need
Expand All @@ -183,13 +183,13 @@ bool LaunchApp(const CommandLine& cl,
LOG(ERROR) << "failed to figure out the buffer size for a commandline";
continue;
}

data.resize(data_len);
if (sysctl(mib, arraysize(mib), &data[0], &data_len, NULL, 0) < 0) {
LOG(ERROR) << "failed to fetch a commandline";
continue;
}

// Data starts w/ the full path null termed, so we have to extract just the
// executable name from the path.

Expand All @@ -203,7 +203,7 @@ bool LaunchApp(const CommandLine& cl,
exec_name = data.substr(0, exec_name_end);
else
exec_name = data.substr(last_slash + 1, exec_name_end - last_slash - 1);

// Check the name
if (executable_name_utf8 == exec_name) {
entry_.pid = kinfo->kp_proc.p_pid;
Expand Down
42 changes: 21 additions & 21 deletions base/time_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,27 +129,27 @@ TimeTicks TimeTicks::Now() {
static mach_timebase_info_data_t timebase_info;
if (timebase_info.denom == 0) {
// Zero-initialization of statics guarantees that denom will be 0 before
// calling mach_timebase_info. mach_timebase_info will never set denom to
// 0 as that would be invalid, so the zero-check can be used to determine
// whether mach_timebase_info has already been called. This is
// recommended by Apple's QA1398.
kern_return_t kr = mach_timebase_info(&timebase_info);
DCHECK(kr == KERN_SUCCESS);
}

// mach_absolute_time is it when it comes to ticks on the Mac. Other calls
// with less precision (such as TickCount) just call through to
// mach_absolute_time.
// timebase_info converts absolute time tick units into nanoseconds. Convert
// to microseconds up front to stave off overflows.
absolute_micro = mach_absolute_time() / Time::kNanosecondsPerMicrosecond *
timebase_info.numer / timebase_info.denom;
// Don't bother with the rollover handling that the Windows version does.
// With numer and denom = 1 (the expected case), the 64-bit absolute time
// reported in nanoseconds is enough to last nearly 585 years.
// calling mach_timebase_info. mach_timebase_info will never set denom to
// 0 as that would be invalid, so the zero-check can be used to determine
// whether mach_timebase_info has already been called. This is
// recommended by Apple's QA1398.
kern_return_t kr = mach_timebase_info(&timebase_info);
DCHECK(kr == KERN_SUCCESS);
}

// mach_absolute_time is it when it comes to ticks on the Mac. Other calls
// with less precision (such as TickCount) just call through to
// mach_absolute_time.

// timebase_info converts absolute time tick units into nanoseconds. Convert
// to microseconds up front to stave off overflows.
absolute_micro = mach_absolute_time() / Time::kNanosecondsPerMicrosecond *
timebase_info.numer / timebase_info.denom;

// Don't bother with the rollover handling that the Windows version does.
// With numer and denom = 1 (the expected case), the 64-bit absolute time
// reported in nanoseconds is enough to last nearly 585 years.

#elif defined(OS_POSIX) && \
defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0

Expand Down
2 changes: 1 addition & 1 deletion base/time_win_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ TEST(TimeTicks, WinRollover) {

TEST(TimeTicks, SubMillisecondTimers) {
// Loop for a bit getting timers quickly. We want to
// see at least one case where we get a new sample in
// see at least one case where we get a new sample in
// less than one millisecond.
bool saw_submillisecond_timer = false;
int64 min_timer = 1000;
Expand Down
2 changes: 1 addition & 1 deletion base/trace_event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void TraceLog::Trace(const std::string& name,
name.c_str(),
id,
extra.c_str(),
file,
file,
line,
usec);

Expand Down
4 changes: 2 additions & 2 deletions chrome/app/chrome_dll_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bool IncorrectChromeHtmlArguments(const std::wstring& command_line) {
// The browser is being launched with chromehtml: somewhere on the command
// line. We will not launch unless it's preceded by the -- switch terminator.
if (pos >= kOffset) {
if (equal(kChromeHtml, kChromeHtml + arraysize(kChromeHtml) - 1,
if (equal(kChromeHtml, kChromeHtml + arraysize(kChromeHtml) - 1,
command_line_lower.begin() + pos - kOffset)) {
return false;
}
Expand Down Expand Up @@ -239,7 +239,7 @@ int ChromeMain(int argc, const char** argv) {
// The exit manager is in charge of calling the dtors of singleton objects.
base::AtExitManager exit_manager;

// We need this pool for all the objects created before we get to the
// We need this pool for all the objects created before we get to the
// event loop, but we don't want to leave them hanging around until the
// app quits. Each "main" needs to flush this pool right before it goes into
// its main event loop to get rid of the cruft.
Expand Down
4 changes: 2 additions & 2 deletions chrome/app/chrome_exe_main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ int main(int argc, const char** argv) {

// The exit manager is in charge of calling the dtors of singletons.
// Win has one here, but we assert with multiples from BrowserMain() if we
// keep it.
// keep it.
// base::AtExitManager exit_manager;

#if defined(GOOGLE_CHROME_BUILD)
// TODO(pinkerton): init crash reporter
#endif
Expand Down
8 changes: 4 additions & 4 deletions chrome/browser/app_controller_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ - (void)dealloc {
// We can't use the standard terminate: method because it will abruptly exit
// the app and leave things on the stack in an unfinalized state. We need to
// post a quit message to our run loop so the stack can gracefully unwind.
- (IBAction)quit:(id)sender {
- (IBAction)quit:(id)sender {
// TODO(pinkerton):
// since we have to roll it ourselves, ask the delegate (ourselves, really)
// if we should terminate. For example, we might not want to if the user
// has ongoing downloads or multiple windows/tabs open. However, this would
// require posting UI and may require spinning up another run loop to
// require posting UI and may require spinning up another run loop to
// handle it. If it says to continue, post the quit message, otherwise
// go back to normal.

Expand All @@ -57,7 +57,7 @@ - (IBAction)quit:(id)sender {

// Close all the windows.
BrowserList::CloseAllBrowsers(true);

// Release the reference to the browser process. Once all the browsers get
// dealloc'd, it will stop the RunLoop and fall back into main().
g_browser_process->ReleaseModule();
Expand Down Expand Up @@ -89,7 +89,7 @@ - (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item {
- (void)commandDispatch:(id)sender {
// How to get the profile created on line 314 of browser_main? Ugh. TODO:FIXME
Profile* default_profile = *g_browser_process->profile_manager()->begin();

NSInteger tag = [sender tag];
switch (tag) {
case IDC_NEW_WINDOW:
Expand Down
12 changes: 6 additions & 6 deletions chrome/browser/autocomplete/autocomplete_edit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bool AutocompleteEditModel::GetURLForText(const std::wstring& text,
UserTextFromDisplayText(text), std::wstring(), &parts, NULL);
if (type != AutocompleteInput::URL)
return false;

*url = GURL(URLFixerUpper::FixupURL(WideToUTF8(text), std::string()));
return true;
}
Expand Down Expand Up @@ -346,12 +346,12 @@ bool AutocompleteEditModel::OnEscapeKeyPressed() {
return true;
}

// If the user wasn't editing, but merely had focus in the edit, allow <esc>
// to be processed as an accelerator, so it can still be used to stop a load.
// When the permanent text isn't all selected we still fall through to the
// SelectAll() call below so users can arrow around in the text and then hit
// If the user wasn't editing, but merely had focus in the edit, allow <esc>
// to be processed as an accelerator, so it can still be used to stop a load.
// When the permanent text isn't all selected we still fall through to the
// SelectAll() call below so users can arrow around in the text and then hit
// <esc> to quickly replace all the text; this matches IE.
if (!user_input_in_progress_ && view_->IsSelectAll())
if (!user_input_in_progress_ && view_->IsSelectAll())
return false;

view_->RevertAll();
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/autocomplete_edit_view_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ void AutocompleteEditViewWin::Update(
CHARRANGE sel;
GetSelection(sel);
const bool was_reversed = (sel.cpMin > sel.cpMax);
const bool was_sel_all = (sel.cpMin != sel.cpMax) &&
const bool was_sel_all = (sel.cpMin != sel.cpMax) &&
IsSelectAllForRange(sel);

RevertAll();
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/search_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void SearchProvider::OnURLFetchComplete(const URLFetcher* source,
// TODO(jungshik): Switch to CodePageToUTF8 after it's added.
if (CodepageToWide(data, charset.c_str(),
OnStringUtilConversionError::FAIL, &wide_data))
json_data = WideToUTF8(wide_data);
json_data = WideToUTF8(wide_data);
}
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ bool BookmarkCodec::DecodeNode(BookmarkModel* model,
if (!DecodeChildren(model, *static_cast<ListValue*>(child_values), node))
return false;
}

node->SetTitle(title);
node->date_added_ = Time::FromInternalValue(
StringToInt64(WideToUTF16Hack(date_added_string)));
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_context_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ BookmarkContextMenu::BookmarkContextMenu(
menu_->AppendMenuItemWithLabel(
IDS_BOOKMARK_BAR_REMOVE,
l10n_util::GetString(IDS_BOOKMARK_BAR_REMOVE));

if (configuration == BOOKMARK_MANAGER_TABLE ||
configuration == BOOKMARK_MANAGER_TABLE_OTHER ||
configuration == BOOKMARK_MANAGER_ORGANIZE_MENU ||
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_context_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Browser;
class PageNavigator;

// BookmarkContextMenu manages the context menu shown for the
// bookmark bar, items on the bookmark bar, submenus of the bookmark bar and
// bookmark bar, items on the bookmark bar, submenus of the bookmark bar and
// the bookmark manager.
class BookmarkContextMenu : public views::MenuDelegate,
public BookmarkModelObserver {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_drop_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class BookmarkDropInfo {

// Used when autoscrolling.
base::RepeatingTimer<BookmarkDropInfo> scroll_timer_;

DISALLOW_COPY_AND_ASSIGN(BookmarkDropInfo);
};

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_html_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ void WriteBookmarks(MessageLoop* thread,
// for the duration of the write), as such we make a copy of the
// BookmarkModel using BookmarkCodec then write from that.
BookmarkCodec codec;
scoped_ptr<Writer> writer(new Writer(codec.Encode(model),
scoped_ptr<Writer> writer(new Writer(codec.Encode(model),
FilePath::FromWStringHack(path)));
if (thread)
thread->PostTask(FROM_HERE, writer.release());
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_table_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ BookmarkTableModel* BookmarkTableModel::CreateBookmarkTableModelForFolder(
BookmarkTableModel* BookmarkTableModel::CreateSearchTableModel(
BookmarkModel* model,
const std::wstring& text) {
return new BookmarkSearchTableModel(model, text);
return new BookmarkSearchTableModel(model, text);
}

BookmarkTableModel::BookmarkTableModel(BookmarkModel* model)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/bookmarks/bookmark_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void OpenAll(gfx::NativeWindow parent,

NewBrowserPageNavigator navigator_impl(profile);
if (!navigator) {
Browser* browser =
Browser* browser =
BrowserList::FindBrowserWithType(profile, Browser::TYPE_NORMAL);
if (!browser || !browser->GetSelectedTabContents()) {
navigator = &navigator_impl;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/cocoa/base_view.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ - (id)initWithFrame:(NSRect)frame {
- (void)dealloc {
[self removeTrackingArea:trackingArea_];
[trackingArea_ release];

[super dealloc];
}

Expand Down
10 changes: 5 additions & 5 deletions chrome/browser/cocoa/browser_window_cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "chrome/browser/cocoa/browser_window_cocoa.h"
#include "chrome/browser/cocoa/browser_window_controller.h"

BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller,
BrowserWindowCocoa::BrowserWindowCocoa(BrowserWindowController* controller,
NSWindow* window)
: controller_(controller), window_(window) {
}
Expand All @@ -27,7 +27,7 @@
bounds.height());
// flip coordinates
NSScreen* screen = [window_ screen];
cocoa_bounds.origin.y =
cocoa_bounds.origin.y =
[screen frame].size.height - bounds.height() - bounds.y();
}

Expand All @@ -44,7 +44,7 @@
}

void BrowserWindowCocoa::FlashFrame() {
[[NSApplication sharedApplication]
[[NSApplication sharedApplication]
requestUserAttention:NSInformationalRequest];
}

Expand Down Expand Up @@ -123,7 +123,7 @@

void BrowserWindowCocoa::UpdateToolbar(TabContents* contents,
bool should_restore_state) {
[controller_ updateToolbarWithContents:contents
[controller_ updateToolbarWithContents:contents
shouldRestoreState:should_restore_state ? YES : NO];
}

Expand Down Expand Up @@ -189,7 +189,7 @@
void* parent_window) {
NOTIMPLEMENTED();
}

void BrowserWindowCocoa::DestroyBrowser() {
[controller_ destroyBrowser];

Expand Down
Loading

0 comments on commit f0a51fb

Please sign in to comment.