summaryrefslogtreecommitdiffstats
path: root/components/dom_distiller
diff options
context:
space:
mode:
authorshashishekhar@chromium.org <shashishekhar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-16 18:01:26 +0000
committershashishekhar@chromium.org <shashishekhar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-16 18:01:26 +0000
commit2c795c617043ed2a90cef8b71a1ed2b1b19f9556 (patch)
tree54398a47fddfd802698acc58b2a67b0891f59906 /components/dom_distiller
parent85090623c639be6ad8e3607e2cd79b9e35a6ae2e (diff)
downloadchromium_src-2c795c617043ed2a90cef8b71a1ed2b1b19f9556.zip
chromium_src-2c795c617043ed2a90cef8b71a1ed2b1b19f9556.tar.gz
chromium_src-2c795c617043ed2a90cef8b71a1ed2b1b19f9556.tar.bz2
Fix some misc style errors.
I ran cpplint to find out if I was introducing any style errors and found quite a few warnings, some of them look genuine, this CL has fixes. BUG=288015 NOTRY=true Review URL: https://codereview.chromium.org/106233006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240922 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/dom_distiller')
-rw-r--r--components/dom_distiller/content/distiller_page_web_contents.h7
-rw-r--r--components/dom_distiller/content/distiller_page_web_contents_browsertest.cc2
-rw-r--r--components/dom_distiller/core/article_entry.h4
-rw-r--r--components/dom_distiller/core/distiller.h1
-rw-r--r--components/dom_distiller/core/distiller_page.h4
-rw-r--r--components/dom_distiller/core/distiller_unittest.cc8
-rw-r--r--components/dom_distiller/core/distiller_url_fetcher.cc2
-rw-r--r--components/dom_distiller/core/distiller_url_fetcher.h9
-rw-r--r--components/dom_distiller/core/distiller_url_fetcher_unittest.cc2
-rw-r--r--components/dom_distiller/core/dom_distiller_database.h3
-rw-r--r--components/dom_distiller/core/dom_distiller_model.cc2
-rw-r--r--components/dom_distiller/core/dom_distiller_model.h5
-rw-r--r--components/dom_distiller/core/dom_distiller_observer.h3
-rw-r--r--components/dom_distiller/core/dom_distiller_service.h3
-rw-r--r--components/dom_distiller/core/dom_distiller_store.h3
-rw-r--r--components/dom_distiller/core/dom_distiller_store_unittest.cc2
-rw-r--r--components/dom_distiller/core/task_tracker.h7
-rw-r--r--components/dom_distiller/webui/dom_distiller_handler.cc2
-rw-r--r--components/dom_distiller/webui/dom_distiller_handler.h2
-rw-r--r--components/dom_distiller/webui/dom_distiller_ui.h2
20 files changed, 51 insertions, 22 deletions
diff --git a/components/dom_distiller/content/distiller_page_web_contents.h b/components/dom_distiller/content/distiller_page_web_contents.h
index 426bc2e..97bd2e0 100644
--- a/components/dom_distiller/content/distiller_page_web_contents.h
+++ b/components/dom_distiller/content/distiller_page_web_contents.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
#define COMPONENTS_DOM_DISTILLER_CONTENT_DISTILLER_PAGE_WEB_CONTENTS_H_
+#include <string>
+
#include "base/memory/scoped_ptr.h"
#include "components/dom_distiller/core/distiller_page.h"
#include "content/public/browser/web_contents.h"
@@ -23,8 +25,9 @@ class DistillerContext;
class DistillerPageWebContentsFactory : public DistillerPageFactory {
public:
- DistillerPageWebContentsFactory(content::BrowserContext* browser_context)
- : DistillerPageFactory(), browser_context_(browser_context) {}
+ explicit DistillerPageWebContentsFactory(
+ content::BrowserContext* browser_context)
+ : DistillerPageFactory(), browser_context_(browser_context) {}
virtual ~DistillerPageWebContentsFactory() {}
virtual scoped_ptr<DistillerPage> CreateDistillerPage(
diff --git a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
index 13f6a49..42446e2 100644
--- a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
+++ b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
@@ -30,7 +30,7 @@ namespace {
" result[2] = \"http://t.com/t.jpg\";"
" return result;"
" }())";
-}
+} // namespace
namespace dom_distiller {
diff --git a/components/dom_distiller/core/article_entry.h b/components/dom_distiller/core/article_entry.h
index a1ffcaa..9f9aad9 100644
--- a/components/dom_distiller/core/article_entry.h
+++ b/components/dom_distiller/core/article_entry.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ENTRY_H_
#define COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ENTRY_H_
+#include <string>
+
#include "sync/api/sync_data.h"
#include "sync/protocol/article_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
@@ -32,4 +34,4 @@ syncer::SyncData CreateLocalData(const ArticleEntry& entry);
} // namespace dom_distiller
-#endif
+#endif // COMPONENTS_DOM_DISTILLER_CORE_ARTICLE_ENTRY_H_
diff --git a/components/dom_distiller/core/distiller.h b/components/dom_distiller/core/distiller.h
index dde179c..adbd41b 100644
--- a/components/dom_distiller/core/distiller.h
+++ b/components/dom_distiller/core/distiller.h
@@ -6,6 +6,7 @@
#define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_H_
#include <map>
+#include <string>
#include "base/callback.h"
#include "base/gtest_prod_util.h"
diff --git a/components/dom_distiller/core/distiller_page.h b/components/dom_distiller/core/distiller_page.h
index 8769a0e..291ef7e 100644
--- a/components/dom_distiller/core/distiller_page.h
+++ b/components/dom_distiller/core/distiller_page.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_PAGE_H_
+#include <string>
+
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "url/gurl.h"
@@ -23,7 +25,7 @@ class DistillerPage {
virtual void OnExecuteJavaScriptDone(const base::Value* value) {}
};
- DistillerPage(Delegate* delegate);
+ explicit DistillerPage(Delegate* delegate);
virtual ~DistillerPage();
diff --git a/components/dom_distiller/core/distiller_unittest.cc b/components/dom_distiller/core/distiller_unittest.cc
index faf24ad..248340b 100644
--- a/components/dom_distiller/core/distiller_unittest.cc
+++ b/components/dom_distiller/core/distiller_unittest.cc
@@ -38,13 +38,12 @@ namespace {
const char kImageURL1[] = "http://a.com/img2.jpg";
const char kImageData0[] = { 'a', 'b', 'c', 'd', 'e', 0 };
const char kImageData1[] = { '1', '2', '3', '4', '5', 0 };
-}
+} // namespace
namespace dom_distiller {
class TestDistillerURLFetcher : public DistillerURLFetcher {
public:
-
TestDistillerURLFetcher() : DistillerURLFetcher(NULL) {
responses_[kImageURL0] = std::string(kImageData0);
responses_[kImageURL1] = std::string(kImageData1);
@@ -83,9 +82,8 @@ class MockDistillerPage : public DistillerPage {
MOCK_METHOD1(LoadURLImpl, void(const GURL& gurl));
MOCK_METHOD1(ExecuteJavaScriptImpl, void(const std::string& script));
- MockDistillerPage(DistillerPage::Delegate* delegate)
- : DistillerPage(delegate) {
- }
+ explicit MockDistillerPage(DistillerPage::Delegate* delegate)
+ : DistillerPage(delegate) {}
};
diff --git a/components/dom_distiller/core/distiller_url_fetcher.cc b/components/dom_distiller/core/distiller_url_fetcher.cc
index 854a34b..8c1998d 100644
--- a/components/dom_distiller/core/distiller_url_fetcher.cc
+++ b/components/dom_distiller/core/distiller_url_fetcher.cc
@@ -63,7 +63,7 @@ void DistillerURLFetcher::OnURLFetchComplete(
// an empty string into the proto otherwise.
source->GetResponseAsString(&response);
}
- callback_.Run(response);
+ callback_.Run(response);
}
} // namespace dom_distiller
diff --git a/components/dom_distiller/core/distiller_url_fetcher.h b/components/dom_distiller/core/distiller_url_fetcher.h
index cb1dad7..346f12e 100644
--- a/components/dom_distiller/core/distiller_url_fetcher.h
+++ b/components/dom_distiller/core/distiller_url_fetcher.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_URL_FETCHER_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_URL_FETCHER_H_
+#include <string>
+
#include "base/callback.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -17,7 +19,8 @@ class DistillerURLFetcher;
// Class for creating a DistillerURLFetcher.
class DistillerURLFetcherFactory {
public:
- DistillerURLFetcherFactory(net::URLRequestContextGetter* context_getter);
+ explicit DistillerURLFetcherFactory(
+ net::URLRequestContextGetter* context_getter);
virtual ~DistillerURLFetcherFactory() {}
virtual DistillerURLFetcher* CreateDistillerURLFetcher() const;
@@ -29,7 +32,7 @@ class DistillerURLFetcherFactory {
// completes or fails. If the request fails, an empty string will be returned.
class DistillerURLFetcher : public net::URLFetcherDelegate {
public:
- DistillerURLFetcher(net::URLRequestContextGetter* context_getter);
+ explicit DistillerURLFetcher(net::URLRequestContextGetter* context_getter);
virtual ~DistillerURLFetcher();
// Indicates when a fetch is done.
@@ -54,6 +57,6 @@ class DistillerURLFetcher : public net::URLFetcherDelegate {
DISALLOW_COPY_AND_ASSIGN(DistillerURLFetcher);
};
-} // namespace dom_distiller
+} // namespace dom_distiller
#endif // COMPONENTS_DOM_DISTILLER_CORE_DISTILLER_URL_FETCHER_H_
diff --git a/components/dom_distiller/core/distiller_url_fetcher_unittest.cc b/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
index b8e6367..de5f45b 100644
--- a/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
+++ b/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
@@ -21,7 +21,7 @@ const char kTestPageBResponse[] = { 'a', 'b', 'c' };
class DistillerURLFetcherTest : public testing::Test {
-public:
+ public:
void FetcherCallback(const std::string& response) {
response_ = response;
}
diff --git a/components/dom_distiller/core/dom_distiller_database.h b/components/dom_distiller/core/dom_distiller_database.h
index 5fdfab3..ca3d80b 100644
--- a/components/dom_distiller/core/dom_distiller_database.h
+++ b/components/dom_distiller/core/dom_distiller_database.h
@@ -90,7 +90,8 @@ class DomDistillerDatabase
scoped_ptr<leveldb::DB> db_;
};
- DomDistillerDatabase(scoped_refptr<base::SequencedTaskRunner> task_runner);
+ explicit DomDistillerDatabase(
+ scoped_refptr<base::SequencedTaskRunner> task_runner);
virtual ~DomDistillerDatabase();
diff --git a/components/dom_distiller/core/dom_distiller_model.cc b/components/dom_distiller/core/dom_distiller_model.cc
index 91b958d..c0b2e6d 100644
--- a/components/dom_distiller/core/dom_distiller_model.cc
+++ b/components/dom_distiller/core/dom_distiller_model.cc
@@ -4,6 +4,8 @@
#include "components/dom_distiller/core/dom_distiller_model.h"
+#include <utility>
+
using syncer::SyncChange;
using syncer::SyncChangeList;
using syncer::SyncData;
diff --git a/components/dom_distiller/core/dom_distiller_model.h b/components/dom_distiller/core/dom_distiller_model.h
index 54c906c..6a9322a 100644
--- a/components/dom_distiller/core/dom_distiller_model.h
+++ b/components/dom_distiller/core/dom_distiller_model.h
@@ -5,13 +5,14 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_MODEL_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_MODEL_H_
+#include <string>
#include <vector>
#include "base/containers/hash_tables.h"
#include "base/id_map.h"
#include "components/dom_distiller/core/article_entry.h"
#include "sync/api/sync_change.h"
-#include "sync/api/sync_change_processor.h" // syncer::SyncChangeList
+#include "sync/api/sync_change_processor.h" // syncer::SyncChangeList
#include "sync/api/sync_data.h"
#include "url/gurl.h"
@@ -86,4 +87,4 @@ class DomDistillerModel {
} // namespace dom_distiller
-#endif
+#endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_MODEL_H_
diff --git a/components/dom_distiller/core/dom_distiller_observer.h b/components/dom_distiller/core/dom_distiller_observer.h
index 4a99f69..ab094ce 100644
--- a/components/dom_distiller/core/dom_distiller_observer.h
+++ b/components/dom_distiller/core/dom_distiller_observer.h
@@ -5,7 +5,9 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_OBSERVER_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_OBSERVER_H_
+#include <string>
#include <vector>
+
#include "components/dom_distiller/core/article_entry.h"
namespace dom_distiller {
@@ -31,6 +33,7 @@ class DomDistillerObserver {
DomDistillerObserver() {}
virtual ~DomDistillerObserver() {}
+ private:
DISALLOW_COPY_AND_ASSIGN(DomDistillerObserver);
};
diff --git a/components/dom_distiller/core/dom_distiller_service.h b/components/dom_distiller/core/dom_distiller_service.h
index fc27d35..ce4f266 100644
--- a/components/dom_distiller/core/dom_distiller_service.h
+++ b/components/dom_distiller/core/dom_distiller_service.h
@@ -5,6 +5,9 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_SERVICE_H_
+#include <string>
+#include <vector>
+
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
diff --git a/components/dom_distiller/core/dom_distiller_store.h b/components/dom_distiller/core/dom_distiller_store.h
index dcd7d95..407e968 100644
--- a/components/dom_distiller/core/dom_distiller_store.h
+++ b/components/dom_distiller/core/dom_distiller_store.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_
#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_
+#include <string>
#include <vector>
#include "base/containers/hash_tables.h"
@@ -157,4 +158,4 @@ class DomDistillerStore : public syncer::SyncableService,
} // namespace dom_distiller
-#endif
+#endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_STORE_H_
diff --git a/components/dom_distiller/core/dom_distiller_store_unittest.cc b/components/dom_distiller/core/dom_distiller_store_unittest.cc
index 8ede320..60c89d8 100644
--- a/components/dom_distiller/core/dom_distiller_store_unittest.cc
+++ b/components/dom_distiller/core/dom_distiller_store_unittest.cc
@@ -54,7 +54,7 @@ class FakeSyncErrorFactory : public syncer::SyncErrorFactory {
class FakeSyncChangeProcessor : public syncer::SyncChangeProcessor {
public:
- FakeSyncChangeProcessor(EntryMap* model) : model_(model) {}
+ explicit FakeSyncChangeProcessor(EntryMap* model) : model_(model) {}
virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const
OVERRIDE {
diff --git a/components/dom_distiller/core/task_tracker.h b/components/dom_distiller/core/task_tracker.h
index 27d7c42..9133103 100644
--- a/components/dom_distiller/core/task_tracker.h
+++ b/components/dom_distiller/core/task_tracker.h
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_TASK_TRACKER_H_
-#define COMPONENTS_DOM_DISTILLER_CORE_DOM_TASK_TRACKER_H_
+#ifndef COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_
+#define COMPONENTS_DOM_DISTILLER_CORE_TASK_TRACKER_H_
+
+#include <string>
+#include <vector>
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
diff --git a/components/dom_distiller/webui/dom_distiller_handler.cc b/components/dom_distiller/webui/dom_distiller_handler.cc
index 6202de7..aaec2c1 100644
--- a/components/dom_distiller/webui/dom_distiller_handler.cc
+++ b/components/dom_distiller/webui/dom_distiller_handler.cc
@@ -4,6 +4,8 @@
#include "components/dom_distiller/webui/dom_distiller_handler.h"
+#include <vector>
+
#include "base/bind.h"
#include "base/values.h"
#include "components/dom_distiller/core/dom_distiller_service.h"
diff --git a/components/dom_distiller/webui/dom_distiller_handler.h b/components/dom_distiller/webui/dom_distiller_handler.h
index faf251c..512da06 100644
--- a/components/dom_distiller/webui/dom_distiller_handler.h
+++ b/components/dom_distiller/webui/dom_distiller_handler.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_
#define COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_
+#include <string>
+
#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "content/public/browser/web_ui_message_handler.h"
diff --git a/components/dom_distiller/webui/dom_distiller_ui.h b/components/dom_distiller/webui/dom_distiller_ui.h
index 12b14bf..c0a5cc8 100644
--- a/components/dom_distiller/webui/dom_distiller_ui.h
+++ b/components/dom_distiller/webui/dom_distiller_ui.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_UI_H_
#define COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_UI_H_
+#include <string>
+
#include "content/public/browser/web_ui_controller.h"
namespace dom_distiller {