diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/child_process.cc | 2 | ||||
-rw-r--r-- | chrome/common/child_process_info.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_paths_mac.mm | 6 | ||||
-rw-r--r-- | chrome/common/chrome_paths_win.cc | 2 | ||||
-rw-r--r-- | chrome/common/extensions/url_pattern.cc | 2 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_font.h | 2 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_font_mac.mm | 10 | ||||
-rw-r--r-- | chrome/common/gfx/text_elider.cc | 4 | ||||
-rw-r--r-- | chrome/common/ipc_sync_channel.cc | 2 | ||||
-rw-r--r-- | chrome/common/json_value_serializer.h | 2 | ||||
-rw-r--r-- | chrome/common/l10n_util.h | 2 | ||||
-rw-r--r-- | chrome/common/page_zoom.h | 2 | ||||
-rw-r--r-- | chrome/common/plugin_messages.h | 2 | ||||
-rw-r--r-- | chrome/common/resource_bundle_mac.mm | 6 | ||||
-rw-r--r-- | chrome/common/sandbox_init_wrapper.cc | 2 | ||||
-rw-r--r-- | chrome/common/sandbox_init_wrapper.h | 4 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 2 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 2 |
18 files changed, 28 insertions, 28 deletions
diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc index 934583a..27b55b7 100644 --- a/chrome/common/child_process.cc +++ b/chrome/common/child_process.cc @@ -13,7 +13,7 @@ ChildProcess* ChildProcess::child_process_; ChildProcess::ChildProcess(ChildThread* child_thread) : child_thread_(child_thread), ref_count_(0), - shutdown_event_(true, false) { + shutdown_event_(true, false) { DCHECK(!child_process_); child_process_ = this; if (child_thread_.get()) // null in unittests. diff --git a/chrome/common/child_process_info.cc b/chrome/common/child_process_info.cc index f1c91c7..1521dab 100644 --- a/chrome/common/child_process_info.cc +++ b/chrome/common/child_process_info.cc @@ -71,7 +71,7 @@ std::wstring ChildProcessInfo::GenerateRandomChannelID(void* instance) { // child processes determine the pid of the parent. // Build the channel ID. This is composed of a unique identifier for the // parent browser process, an identifier for the child instance, and a random - // component. We use a random component so that a hacked child process can't + // component. We use a random component so that a hacked child process can't // cause denial of service by causing future named pipe creation to fail. return StringPrintf(L"%d.%x.%d", base::GetCurrentProcId(), instance, diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm index 1e00bf9..e8e8f92 100644 --- a/chrome/common/chrome_paths_mac.mm +++ b/chrome/common/chrome_paths_mac.mm @@ -21,7 +21,7 @@ bool GetDefaultUserDataDirectory(FilePath* result) { bool GetUserDocumentsDirectory(FilePath* result) { bool success = false; - NSArray* docArray = + NSArray* docArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); @@ -34,7 +34,7 @@ bool GetUserDocumentsDirectory(FilePath* result) { bool GetUserDownloadsDirectory(FilePath* result) { bool success = false; - NSArray* docArray = + NSArray* docArray = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask, YES); @@ -47,7 +47,7 @@ bool GetUserDownloadsDirectory(FilePath* result) { bool GetUserDesktop(FilePath* result) { bool success = false; - NSArray* docArray = + NSArray* docArray = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES); diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc index 52e8712..257d5bb 100644 --- a/chrome/common/chrome_paths_win.cc +++ b/chrome/common/chrome_paths_win.cc @@ -39,7 +39,7 @@ bool GetUserDocumentsDirectory(FilePath* result) { // but it can be set to Desktop, which is dangerous. Instead, // we just use 'Downloads' under DIR_USER_DOCUMENTS. Localizing // 'downloads' is not a good idea because Chrome's UI language -// can be changed. +// can be changed. bool GetUserDownloadsDirectory(FilePath* result) { if (!GetUserDocumentsDirectory(result)) return false; diff --git a/chrome/common/extensions/url_pattern.cc b/chrome/common/extensions/url_pattern.cc index 7f705f2..b6aff22 100644 --- a/chrome/common/extensions/url_pattern.cc +++ b/chrome/common/extensions/url_pattern.cc @@ -75,7 +75,7 @@ bool URLPattern::Parse(const std::string& pattern) { path_start_pos = host_end_pos; } - + path_ = pattern.substr(path_start_pos); return true; } diff --git a/chrome/common/gfx/chrome_font.h b/chrome/common/gfx/chrome_font.h index 8ac225c..7c25a9b 100644 --- a/chrome/common/gfx/chrome_font.h +++ b/chrome/common/gfx/chrome_font.h @@ -215,7 +215,7 @@ class ChromeFont { int avg_width_; #elif defined(OS_MACOSX) explicit ChromeFont(const std::wstring& font_name, int font_size, int style); - + // Calculate and cache the font metrics. void calculateMetrics(); diff --git a/chrome/common/gfx/chrome_font_mac.mm b/chrome/common/gfx/chrome_font_mac.mm index a553be6..590c54e 100644 --- a/chrome/common/gfx/chrome_font_mac.mm +++ b/chrome/common/gfx/chrome_font_mac.mm @@ -9,8 +9,8 @@ #include "base/logging.h" #include "base/sys_string_conversions.h" -// static -ChromeFont ChromeFont::CreateFont(const std::wstring& font_name, +// static +ChromeFont ChromeFont::CreateFont(const std::wstring& font_name, int font_size) { return ChromeFont(font_name, font_size, NORMAL); } @@ -22,7 +22,7 @@ ChromeFont::ChromeFont(const std::wstring& font_name, int font_size, int style) calculateMetrics(); } -ChromeFont::ChromeFont() +ChromeFont::ChromeFont() : font_size_([NSFont systemFontSize]), style_(NORMAL) { NSFont* system_font = [NSFont systemFontOfSize:font_size_]; @@ -56,7 +56,7 @@ int ChromeFont::ave_char_width() const { int ChromeFont::GetStringWidth(const std::wstring& text) const { NSFont* font = nativeFont(); NSString* ns_string = base::SysWideToNSString(text); - NSDictionary* attributes = + NSDictionary* attributes = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]; NSSize string_size = [ns_string sizeWithAttributes:attributes]; return string_size.width; @@ -82,6 +82,6 @@ NativeFont ChromeFont::nativeFont() const { // TODO(pinkerton): apply |style_| to font. // We could cache this, but then we'd have to conditionally change the // dtor just for MacOS. Not sure if we want to/need to do that. - return [NSFont fontWithName:base::SysWideToNSString(font_name_) + return [NSFont fontWithName:base::SysWideToNSString(font_name_) size:font_size_]; } diff --git a/chrome/common/gfx/text_elider.cc b/chrome/common/gfx/text_elider.cc index f7405a2..f4a6d4e 100644 --- a/chrome/common/gfx/text_elider.cc +++ b/chrome/common/gfx/text_elider.cc @@ -168,9 +168,9 @@ std::wstring ElideUrl(const GURL& url, } const int kMaxNumberOfUrlPathElementsAllowed = 1024; - if (url_path_number_of_elements <= 1 || + if (url_path_number_of_elements <= 1 || url_path_number_of_elements > kMaxNumberOfUrlPathElementsAllowed) { - // No path to elide, or too long of a path (could overflow in loop below) + // No path to elide, or too long of a path (could overflow in loop below) // Just elide this as a text string. return ElideText(url_subdomain + url_domain + url_path_query_etc, font, available_pixel_width); diff --git a/chrome/common/ipc_sync_channel.cc b/chrome/common/ipc_sync_channel.cc index 0de4a86..4abef3a4 100644 --- a/chrome/common/ipc_sync_channel.cc +++ b/chrome/common/ipc_sync_channel.cc @@ -400,7 +400,7 @@ bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) { // We use the sync message id so that when a message times out, we don't // confuse it with another send that is either above/below this Send in // the call stack. - context->ipc_message_loop()->PostDelayedTask(FROM_HERE, + context->ipc_message_loop()->PostDelayedTask(FROM_HERE, NewRunnableMethod(context.get(), &SyncContext::OnSendTimeout, message_id), timeout_ms); } diff --git a/chrome/common/json_value_serializer.h b/chrome/common/json_value_serializer.h index 71038fe..47e4584 100644 --- a/chrome/common/json_value_serializer.h +++ b/chrome/common/json_value_serializer.h @@ -55,7 +55,7 @@ class JSONStringValueSerializer : public ValueSerializer { bool initialized_with_const_string_; bool pretty_print_; // If true, serialization will span multiple lines. // If true, deserialization will allow trailing commas. - bool allow_trailing_comma_; + bool allow_trailing_comma_; DISALLOW_EVIL_CONSTRUCTORS(JSONStringValueSerializer); }; diff --git a/chrome/common/l10n_util.h b/chrome/common/l10n_util.h index 480c1bd..6d7166e 100644 --- a/chrome/common/l10n_util.h +++ b/chrome/common/l10n_util.h @@ -239,7 +239,7 @@ void SortStringsUsingMethod(const std::wstring& locale, StringMethodComparator<T,Method>(method)); return; } - + std::sort(elements->begin(), elements->end(), StringMethodComparatorWithCollator<T,Method>(collator.get(), method)); } diff --git a/chrome/common/page_zoom.h b/chrome/common/page_zoom.h index 17743b7..daf5b9b 100644 --- a/chrome/common/page_zoom.h +++ b/chrome/common/page_zoom.h @@ -14,7 +14,7 @@ class PageZoom { STANDARD = 0, LARGER = 1, }; - + private: PageZoom() {} // For scoping only. }; diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h index 8a6a63a..c0c5a46 100644 --- a/chrome/common/plugin_messages.h +++ b/chrome/common/plugin_messages.h @@ -204,7 +204,7 @@ struct ParamTraits<PluginMsg_URLRequestReply_Params> { ReadParam(m, iter, &p->resource_id) && ReadParam(m, iter, &p->url) && ReadParam(m, iter, &p->notify_needed) && - ReadParam(m, iter, &p->notify_data) && + ReadParam(m, iter, &p->notify_data) && ReadParam(m, iter, &p->stream); } static void Log(const param_type& p, std::wstring* l) { diff --git a/chrome/common/resource_bundle_mac.mm b/chrome/common/resource_bundle_mac.mm index 5949572..3059d62 100644 --- a/chrome/common/resource_bundle_mac.mm +++ b/chrome/common/resource_bundle_mac.mm @@ -35,7 +35,7 @@ namespace { base::DataPack *LoadResourceDataPack(NSString *name) { base::DataPack *resource_pack = NULL; - + NSString *resource_path = [mac_util::MainAppBundle() pathForResource:name ofType:@"pak"]; if (resource_path) { @@ -47,7 +47,7 @@ base::DataPack *LoadResourceDataPack(NSString *name) { resource_pack = NULL; } } - + return resource_pack; } @@ -56,7 +56,7 @@ base::DataPack *LoadResourceDataPack(NSString *name) { void ResourceBundle::LoadResources(const std::wstring& pref_locale) { DLOG_IF(WARNING, pref_locale.size() != 0) << "ignoring requested locale in favor of NSBundle's selection"; - + DCHECK(resources_data_ == NULL) << "resource data already loaded!"; resources_data_ = LoadResourceDataPack(@"chrome"); DCHECK(resources_data_) << "failed to load chrome.pak"; diff --git a/chrome/common/sandbox_init_wrapper.cc b/chrome/common/sandbox_init_wrapper.cc index 6fcf664..5eb45cb 100644 --- a/chrome/common/sandbox_init_wrapper.cc +++ b/chrome/common/sandbox_init_wrapper.cc @@ -18,7 +18,7 @@ void SandboxInitWrapper::SetServices(sandbox::SandboxInterfaceInfo* info) { #endif -void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, +void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, const std::wstring& process_type) { #if defined(OS_WIN) if (!target_services_) diff --git a/chrome/common/sandbox_init_wrapper.h b/chrome/common/sandbox_init_wrapper.h index e9a718a..c8893a3 100644 --- a/chrome/common/sandbox_init_wrapper.h +++ b/chrome/common/sandbox_init_wrapper.h @@ -33,7 +33,7 @@ class SandboxInitWrapper { // Initialize the sandbox for renderer and plug-in processes, depending on // the command line flags. The browser process is not sandboxed. - void InitializeSandbox(const CommandLine& parsed_command_line, + void InitializeSandbox(const CommandLine& parsed_command_line, const std::wstring& process_type); private: sandbox::BrokerServices* broker_services_; @@ -50,7 +50,7 @@ class SandboxInitWrapper { // Initialize the sandbox for renderer and plug-in processes, depending on // the command line flags. The browser process is not sandboxed. - void InitializeSandbox(const CommandLine& parsed_command_line, + void InitializeSandbox(const CommandLine& parsed_command_line, const std::wstring& process_type); #if defined(OS_MACOSX) diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 5cd4428..96a7bed 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -336,7 +336,7 @@ void TabContents::SetIsLoading(bool is_loading, NotificationDetails det = NotificationService::NoDetails();; if (details) det = Details<LoadNotificationDetails>(details); - NotificationService::current()->Notify(type, + NotificationService::current()->Notify(type, Source<NavigationController>(this->controller()), det); } diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index ca7cf64..1b7d1e2 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -417,7 +417,7 @@ class TabContents : public PageNavigator, public NotificationObserver { }; TabContents(TabContentsType type) : type_(type), is_crashed_(false), is_active_(true), is_loading_(false), - is_being_destroyed_(false), waiting_for_response_(false), + is_being_destroyed_(false), waiting_for_response_(false), shelf_visible_(false), controller_(), delegate_(), max_page_id_(-1) { } virtual ~TabContents() { } NavigationController* controller() const { return controller_; } |