summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-12 05:18:03 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-12 05:18:03 +0000
commitdb7ed13e6ce3fb75e8556c0efad32c933ec1c768 (patch)
tree246981053aefe91ef7cbf082656746292b772e81 /chrome/browser/chromeos
parent7864eb83fbf52fdd80047a028ac6bda113567c69 (diff)
downloadchromium_src-db7ed13e6ce3fb75e8556c0efad32c933ec1c768.zip
chromium_src-db7ed13e6ce3fb75e8556c0efad32c933ec1c768.tar.gz
chromium_src-db7ed13e6ce3fb75e8556c0efad32c933ec1c768.tar.bz2
Misc cleanups in Drive code.
Typo fix, style fix, unused #include/forward-declarations clean up, adding const, reordering declarations properly, etc. BUG=none. TEST=it compiles. Review URL: https://codereview.chromium.org/12229002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/drive/drive_feed_loader_observer.h2
-rw-r--r--chrome/browser/chromeos/drive/drive_file_system_metadata.h2
-rw-r--r--chrome/browser/chromeos/drive/drive_file_system_util.h5
-rw-r--r--chrome/browser/chromeos/drive/drive_scheduler.cc4
-rw-r--r--chrome/browser/chromeos/drive/drive_scheduler.h7
-rw-r--r--chrome/browser/chromeos/drive/drive_system_service.cc1
-rw-r--r--chrome/browser/chromeos/drive/search_metadata.cc2
-rw-r--r--chrome/browser/chromeos/drive/search_metadata.h4
8 files changed, 10 insertions, 17 deletions
diff --git a/chrome/browser/chromeos/drive/drive_feed_loader_observer.h b/chrome/browser/chromeos/drive/drive_feed_loader_observer.h
index 1d3e504..857c57b 100644
--- a/chrome/browser/chromeos/drive/drive_feed_loader_observer.h
+++ b/chrome/browser/chromeos/drive/drive_feed_loader_observer.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_OBSERVER_H_
#define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_OBSERVER_H_
-#include <string>
-
namespace base {
class FilePath;
}
diff --git a/chrome/browser/chromeos/drive/drive_file_system_metadata.h b/chrome/browser/chromeos/drive/drive_file_system_metadata.h
index 047f1d8..7a256d6 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_metadata.h
+++ b/chrome/browser/chromeos/drive/drive_file_system_metadata.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_METADATA_H_
#define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_METADATA_H_
-#include <string>
-
#include "base/basictypes.h"
#include "base/time.h"
#include "chrome/browser/chromeos/drive/drive_file_error.h"
diff --git a/chrome/browser/chromeos/drive/drive_file_system_util.h b/chrome/browser/chromeos/drive/drive_file_system_util.h
index 0f9a6a6..49eeeff 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_util.h
+++ b/chrome/browser/chromeos/drive/drive_file_system_util.h
@@ -6,13 +6,10 @@
#define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
#include <string>
-#include <utility>
-#include <vector>
#include "base/callback_forward.h"
-#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
-#include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
+#include "chrome/browser/chromeos/drive/drive_file_error.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/chromeos/drive/drive_scheduler.cc b/chrome/browser/chromeos/drive/drive_scheduler.cc
index 6215b84..f5df202 100644
--- a/chrome/browser/chromeos/drive/drive_scheduler.cc
+++ b/chrome/browser/chromeos/drive/drive_scheduler.cc
@@ -61,8 +61,8 @@ DriveScheduler::DriveScheduler(
drive_service_(drive_service),
uploader_(uploader),
profile_(profile),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
- initialized_(false) {
+ initialized_(false),
+ weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
for (int i = 0; i < NUM_QUEUES; ++i) {
job_loop_is_running_[i] = false;
diff --git a/chrome/browser/chromeos/drive/drive_scheduler.h b/chrome/browser/chromeos/drive/drive_scheduler.h
index e60f907..fe991e4 100644
--- a/chrome/browser/chromeos/drive/drive_scheduler.h
+++ b/chrome/browser/chromeos/drive/drive_scheduler.h
@@ -377,13 +377,12 @@ class DriveScheduler
Profile* profile_;
- // Note: This should remain the last member so it'll be destroyed and
- // invalidate its weak pointers before any other members are destroyed.
- base::WeakPtrFactory<DriveScheduler> weak_ptr_factory_;
-
// Whether this instance is initialized or not.
bool initialized_;
+ // Note: This should remain the last member so it'll be destroyed and
+ // invalidate its weak pointers before any other members are destroyed.
+ base::WeakPtrFactory<DriveScheduler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DriveScheduler);
};
diff --git a/chrome/browser/chromeos/drive/drive_system_service.cc b/chrome/browser/chromeos/drive/drive_system_service.cc
index 8d61c70..1a86e98 100644
--- a/chrome/browser/chromeos/drive/drive_system_service.cc
+++ b/chrome/browser/chromeos/drive/drive_system_service.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/download/download_service.h"
#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/download/download_util.h"
+#include "chrome/browser/google_apis/auth_service.h"
#include "chrome/browser/google_apis/drive_api_service.h"
#include "chrome/browser/google_apis/drive_api_util.h"
#include "chrome/browser/google_apis/drive_uploader.h"
diff --git a/chrome/browser/chromeos/drive/search_metadata.cc b/chrome/browser/chromeos/drive/search_metadata.cc
index bc13d24..600cbf8 100644
--- a/chrome/browser/chromeos/drive/search_metadata.cc
+++ b/chrome/browser/chromeos/drive/search_metadata.cc
@@ -113,7 +113,7 @@ class SearchMetadataHelper {
// Search is complete. Send the result to the callback.
std::sort(results_->begin(), results_->end(), &CompareByTimestamp);
if (results_->size() > static_cast<size_t>(at_most_num_matches_)) {
- // Don't use resize() as it requres a default constructor.
+ // Don't use resize() as it requires a default constructor.
results_->erase(results_->begin() + at_most_num_matches_,
results_->end());
}
diff --git a/chrome/browser/chromeos/drive/search_metadata.h b/chrome/browser/chromeos/drive/search_metadata.h
index 9cb7beb..8e13e11 100644
--- a/chrome/browser/chromeos/drive/search_metadata.h
+++ b/chrome/browser/chromeos/drive/search_metadata.h
@@ -27,12 +27,12 @@ struct MetadataSearchResult {
DriveEntryProto entry_proto;
// The base name to be displayed in the UI. The parts matched the search
- // query are highlited with <b> tag. Meta characters are escaped like &lt;
+ // query are highlighted with <b> tag. Meta characters are escaped like &lt;
//
// Why HTML? we could instead provide matched ranges using pairs of
// integers, but this is fragile as we'll eventually converting strings
// from UTF-8 (StringValue in base/values.h uses std::string) to UTF-16
- // when sending strings from C++ to JavaSCript.
+ // when sending strings from C++ to JavaScript.
//
// Why <b> instead of <strong>? Because <b> is shorter.
std::string highlighted_base_name;