summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_menu_manager.cc6
-rw-r--r--chrome/browser/extensions/extension_menu_manager.h7
-rw-r--r--chrome/browser/extensions/extension_processes_api.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc5
-rw-r--r--chrome/browser/extensions/extension_tts_api.cc4
-rw-r--r--chrome/browser/extensions/extension_tts_api.h4
6 files changed, 17 insertions, 11 deletions
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc
index f364787..c87dfb7 100644
--- a/chrome/browser/extensions/extension_menu_manager.cc
+++ b/chrome/browser/extensions/extension_menu_manager.cc
@@ -22,7 +22,7 @@
#include "webkit/glue/context_menu.h"
ExtensionMenuItem::ExtensionMenuItem(const Id& id,
- std::string title,
+ const std::string& title,
bool checked,
Type type,
const ContextList& contexts)
@@ -477,7 +477,9 @@ ExtensionMenuItem::Id::Id()
: profile(NULL), uid(0) {
}
-ExtensionMenuItem::Id::Id(Profile* profile, std::string extension_id, int uid)
+ExtensionMenuItem::Id::Id(Profile* profile,
+ const std::string& extension_id,
+ int uid)
: profile(profile), extension_id(extension_id), uid(uid) {
}
diff --git a/chrome/browser/extensions/extension_menu_manager.h b/chrome/browser/extensions/extension_menu_manager.h
index 2718c7c..b54d57a 100644
--- a/chrome/browser/extensions/extension_menu_manager.h
+++ b/chrome/browser/extensions/extension_menu_manager.h
@@ -36,7 +36,7 @@ class ExtensionMenuItem {
// An Id uniquely identifies a context menu item registered by an extension.
struct Id {
Id();
- Id(Profile* profile, std::string extension_id, int uid);
+ Id(Profile* profile, const std::string& extension_id, int uid);
~Id();
bool operator==(const Id& other) const;
@@ -99,7 +99,10 @@ class ExtensionMenuItem {
uint32 value_; // A bitmask of Context values.
};
- ExtensionMenuItem(const Id& id, std::string title, bool checked, Type type,
+ ExtensionMenuItem(const Id& id,
+ const std::string& title,
+ bool checked,
+ Type type,
const ContextList& contexts);
virtual ~ExtensionMenuItem();
diff --git a/chrome/browser/extensions/extension_processes_api.cc b/chrome/browser/extensions/extension_processes_api.cc
index 3944b47..266afdc 100644
--- a/chrome/browser/extensions/extension_processes_api.cc
+++ b/chrome/browser/extensions/extension_processes_api.cc
@@ -27,7 +27,7 @@
namespace keys = extension_processes_api_constants;
DictionaryValue* CreateProcessValue(int process_id,
- std::string type,
+ const std::string& type,
double cpu,
int64 net,
int64 pr_mem,
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 5b062d3..fae2ce7 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -70,7 +70,7 @@ static bool GetTabById(int tab_id, Profile* profile,
// (chrome-extension://<id>/). Using the source frame url would be more correct,
// but because the api shipped with urls resolved relative to their extension
// base, we decided it wasn't worth breaking existing extensions to fix.
-static GURL ResolvePossiblyRelativeURL(std::string url_string,
+static GURL ResolvePossiblyRelativeURL(const std::string& url_string,
const Extension* extension);
// Return the type name for a browser window type.
@@ -1228,6 +1228,7 @@ void DetectTabLanguageFunction::GotLanguage(const std::string& language) {
}
// static helpers
+// TODO(jhawkins): Move these to unnamed namespace and remove static modifier.
static Browser* GetBrowserInProfileWithId(Profile* profile,
const int window_id,
@@ -1280,7 +1281,7 @@ static std::string GetWindowTypeText(Browser::Type type) {
return keys::kWindowTypeValueNormal;
}
-static GURL ResolvePossiblyRelativeURL(std::string url_string,
+static GURL ResolvePossiblyRelativeURL(const std::string& url_string,
const Extension* extension) {
GURL url = GURL(url_string);
if (!url.is_valid())
diff --git a/chrome/browser/extensions/extension_tts_api.cc b/chrome/browser/extensions/extension_tts_api.cc
index c618db3..997f080 100644
--- a/chrome/browser/extensions/extension_tts_api.cc
+++ b/chrome/browser/extensions/extension_tts_api.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -257,7 +257,7 @@ void ExtensionTtsController::Stop() {
}
void ExtensionTtsController::OnSpeechFinished(
- int request_id, std::string error_message) {
+ int request_id, const std::string& error_message) {
// We may sometimes receive completion callbacks "late", after we've
// already finished the utterance (for example because another utterance
// interrupted or we got a call to Stop). It's also possible that a buggy
diff --git a/chrome/browser/extensions/extension_tts_api.h b/chrome/browser/extensions/extension_tts_api.h
index 226d8e5..ad436a8 100644
--- a/chrome/browser/extensions/extension_tts_api.h
+++ b/chrome/browser/extensions/extension_tts_api.h
@@ -24,7 +24,7 @@ class ExtensionTtsPlatformImpl {
// will be empty strings, and rate, pitch, and volume will be -1.0.
//
// The ExtensionTtsController will only try to speak one utterance at
- // a time. If it wants to intterupt speech, it will always call Stop
+ // a time. If it wants to interrupt speech, it will always call Stop
// before speaking again, otherwise it will wait until IsSpeaking
// returns false before calling Speak again.
virtual bool Speak(
@@ -148,7 +148,7 @@ class ExtensionTtsController {
void Stop();
// Called when an extension finishes speaking an utterance.
- void OnSpeechFinished(int request_id, std::string error_message);
+ void OnSpeechFinished(int request_id, const std::string& error_message);
// For unit testing.
void SetPlatformImpl(ExtensionTtsPlatformImpl* platform_impl);