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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 reinterpret_cast<const char*>(vector_as_array(&data)), data.size()); 1843 reinterpret_cast<const char*>(vector_as_array(&data)), data.size());
1844 1844
1845 base::Base64Encode(stream_as_string, &base64_result); 1845 base::Base64Encode(stream_as_string, &base64_result);
1846 base64_result.insert(0, base::StringPrintf("data:%s;base64,", 1846 base64_result.insert(0, base::StringPrintf("data:%s;base64,",
1847 mime_type.c_str())); 1847 mime_type.c_str()));
1848 SetResult(new StringValue(base64_result)); 1848 SetResult(new StringValue(base64_result));
1849 SendResponse(true); 1849 SendResponse(true);
1850 } 1850 }
1851 1851
1852 void TabsCaptureVisibleTabFunction::RegisterUserPrefs( 1852 void TabsCaptureVisibleTabFunction::RegisterUserPrefs(
1853 PrefRegistrySyncable* registry) { 1853 user_prefs::PrefRegistrySyncable* registry) {
1854 registry->RegisterBooleanPref(prefs::kDisableScreenshots, false, 1854 registry->RegisterBooleanPref(
1855 PrefRegistrySyncable::UNSYNCABLE_PREF); 1855 prefs::kDisableScreenshots,
1856 false,
1857 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
1856 } 1858 }
1857 1859
1858 bool TabsDetectLanguageFunction::RunImpl() { 1860 bool TabsDetectLanguageFunction::RunImpl() {
1859 int tab_id = 0; 1861 int tab_id = 0;
1860 Browser* browser = NULL; 1862 Browser* browser = NULL;
1861 WebContents* contents = NULL; 1863 WebContents* contents = NULL;
1862 1864
1863 // If |tab_id| is specified, look for it. Otherwise default to selected tab 1865 // If |tab_id| is specified, look for it. Otherwise default to selected tab
1864 // in the current window. 1866 // in the current window.
1865 if (HasOptionalArgument(0)) { 1867 if (HasOptionalArgument(0)) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 extension->id(), 2163 extension->id(),
2162 script_type, 2164 script_type,
2163 code_string, 2165 code_string,
2164 frame_scope, 2166 frame_scope,
2165 run_at, 2167 run_at,
2166 ScriptExecutor::ISOLATED_WORLD, 2168 ScriptExecutor::ISOLATED_WORLD,
2167 false /* is_web_view */, 2169 false /* is_web_view */,
2168 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); 2170 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this));
2169 return true; 2171 return true;
2170 } 2172 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.h ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698