Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: chrome/browser/extensions/api/settings_overrides/settings_overrides_browsertest.cc

Issue 367023002: Componentize TemplateURLService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/prefs/session_startup_pref.h" 9 #include "chrome/browser/prefs/session_startup_pref.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search_engines/template_url_service.h"
12 #include "chrome/browser/search_engines/template_url_service_factory.h" 11 #include "chrome/browser/search_engines/template_url_service_factory.h"
13 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
14 #include "components/search_engines/template_url.h" 13 #include "components/search_engines/template_url.h"
14 #include "components/search_engines/template_url_service.h"
15 15
16 namespace { 16 namespace {
17 17
18 class TemplateURLServiceObserver { 18 class TemplateURLServiceObserver {
19 public: 19 public:
20 TemplateURLServiceObserver(TemplateURLService* service, 20 TemplateURLServiceObserver(TemplateURLService* service,
21 base::RunLoop* loop) 21 base::RunLoop* loop)
22 : runner_(loop) { 22 : runner_(loop) {
23 DCHECK(loop); 23 DCHECK(loop);
24 template_url_sub_ = service->RegisterOnLoadedCallback( 24 template_url_sub_ = service->RegisterOnLoadedCallback(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ASSERT_TRUE(extension); 124 ASSERT_TRUE(extension);
125 ASSERT_EQ(1u, extension->install_warnings().size()); 125 ASSERT_EQ(1u, extension->install_warnings().size());
126 EXPECT_EQ(std::string( 126 EXPECT_EQ(std::string(
127 "'chrome_settings_overrides' " 127 "'chrome_settings_overrides' "
128 "is not allowed for specified platform."), 128 "is not allowed for specified platform."),
129 extension->install_warnings().front().message); 129 extension->install_warnings().front().message);
130 #endif 130 #endif
131 } 131 }
132 132
133 } // namespace 133 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698